Skip to content

Commit

Permalink
go-colorable does not work in app engine
Browse files Browse the repository at this point in the history
  • Loading branch information
manucorporat committed Jan 26, 2016
1 parent 4c639a5 commit 60f6691
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions mode.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import (
"os"

"github.com/gin-gonic/gin/binding"
"github.com/mattn/go-colorable"
)

const ENV_GIN_MODE = "GIN_MODE"
Expand All @@ -25,7 +24,18 @@ const (
testCode = iota
)

var DefaultWriter io.Writer = colorable.NewColorableStdout()
// DefaultWriter is the default io.Writer used the Gin for debug output and
// middleware output like Logger() or Recovery().
// Note that both Logger and Recovery provides custom ways to configure their
// output io.Writer.
// To support coloring in Windows use:
// ```
// import "github.com/mattn/go-colorable"
// gin.DefaultWriter = colorable.NewColorableStdout()
// ```
var DefaultWriter io.Writer = os.Stdout
var DefaultErrorWriter io.Writer = os.Stderr

var ginMode int = debugCode
var modeName string = DebugMode

Expand Down

0 comments on commit 60f6691

Please sign in to comment.