Skip to content

About

struct error wrap

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

2 Commits

Folders and files

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

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages