mirror of https://github.com/gin-gonic/gin.git
go-colorable does not work in app engine
This commit is contained in:
parent
4c639a5049
commit
60f66918f8
14
mode.go
14
mode.go
|
@ -9,7 +9,6 @@ import (
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"github.com/gin-gonic/gin/binding"
|
"github.com/gin-gonic/gin/binding"
|
||||||
"github.com/mattn/go-colorable"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
const ENV_GIN_MODE = "GIN_MODE"
|
const ENV_GIN_MODE = "GIN_MODE"
|
||||||
|
@ -25,7 +24,18 @@ const (
|
||||||
testCode = iota
|
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 ginMode int = debugCode
|
||||||
var modeName string = DebugMode
|
var modeName string = DebugMode
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue