go-colorable does not work in app engine

This commit is contained in:
Manu Mtz.-Almeida 2016-01-26 18:53:00 +01:00
parent 4c639a5049
commit 60f66918f8

14
mode.go
View File

@ -9,7 +9,6 @@ import (
"os"
"github.com/gin-gonic/gin/binding"
"github.com/mattn/go-colorable"
)
const ENV_GIN_MODE = "GIN_MODE"
@ -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