Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added some comments to avoid having golint warnings #1619

Merged
merged 1 commit into from
Nov 1, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions errors.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@ const (
ErrorTypePrivate ErrorType = 1 << 0
// ErrorTypePublic indicates a public error.
ErrorTypePublic ErrorType = 1 << 1
// ErrorTypeAny indicates other any error.
// ErrorTypeAny indicates any other error.
ErrorTypeAny ErrorType = 1<<64 - 1
ErrorTypeNu = 2
// ErrorTypeNu indicates any other error.
ErrorTypeNu = 2
)

// Error represents a error's specification.
Expand All @@ -52,6 +53,7 @@ func (msg *Error) SetMeta(data interface{}) *Error {
return msg
}

// JSON creates a properly formated JSON
func (msg *Error) JSON() interface{} {
json := H{}
if msg.Meta != nil {
Expand Down
4 changes: 3 additions & 1 deletion mode.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,16 @@ const (
testCode
)

// DefaultWriter is the default io.Writer used the Gin for debug output and
// DefaultWriter is the default io.Writer used by 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

// DefaultErrorWriter is the default io.Writer used by Gin to debug errors
var DefaultErrorWriter io.Writer = os.Stderr

var ginMode = debugCode
Expand Down