Skip to content

leanfra/structerror

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

structerror

A error with code and message.

  • easy to compare with the code.
  • output as struct string like json.
// StructError interface
type StructError interface {
	error
	ErrorCode() int
}

// StructJsonError interface
type StructJsonError interface {
	StructError
	JSON() (string, error)
}

CodeError

An impletement of struct error.

type CodeError struct {
	Code   int
	Status string
	Msg    string
	Causes []error
}

About

struct error wrap

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages