diff --git a/mode.go b/mode.go index 15efaeb8..4e2ba46e 100644 --- a/mode.go +++ b/mode.go @@ -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