vendor: update all dependencies to latest versions
This commit is contained in:
parent
8e83fb6fb9
commit
7d3a17725d
4878 changed files with 1974229 additions and 201215 deletions
16
vendor/github.com/pengsrc/go-shared/check/error.go
generated
vendored
16
vendor/github.com/pengsrc/go-shared/check/error.go
generated
vendored
|
@ -5,6 +5,22 @@ import (
|
|||
"os"
|
||||
)
|
||||
|
||||
// ReadableError is just a structure contains readable message that can be
|
||||
// returned directly to end user.
|
||||
type ReadableError struct {
|
||||
Message string
|
||||
}
|
||||
|
||||
// Error returns the description of ReadableError.
|
||||
func (e ReadableError) Error() string {
|
||||
return e.Message
|
||||
}
|
||||
|
||||
// NewReadableError creates a ReadableError{} from given message.
|
||||
func NewReadableError(message string) ReadableError {
|
||||
return ReadableError{Message: message}
|
||||
}
|
||||
|
||||
// ErrorForExit check the error.
|
||||
// If error is not nil, print the error message and exit the application.
|
||||
// If error is nil, do nothing.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue