Skip to content

Commit

Permalink
refactor cli.New()
Browse files Browse the repository at this point in the history
  • Loading branch information
tj committed Jan 18, 2018
1 parent a0aa13b commit ff0f669
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions handlers/cli/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,13 @@ type Handler struct {

// New handler.
func New(w io.Writer) *Handler {
switch w2 := w.(type) {
case *os.File:
if f, ok := w.(*os.File); ok {
return &Handler{
Writer: colorable.NewColorable(w2),
Writer: colorable.NewColorable(f),
Padding: 3,
}
}

return &Handler{
Writer: w,
Padding: 3,
Expand Down

0 comments on commit ff0f669

Please sign in to comment.