1 package term 2 3 import ( 4 "io" 5 6 "github.com/go-kit/log/term" 7 ) 8 9 // NewColorWriter returns an io.Writer that writes to w and provides cross 10 // platform support for ANSI color codes. If w is not a terminal it is 11 // returned unmodified. 12 func NewColorWriter(w io.Writer) io.Writer { 13 return term.NewColorWriter(w) 14 } 15