
This change causes the linter to be a bit more complainy. The hope is that this will cut down on some of the more pedantic issues being caught in code reviews, and thus reduce the overall time a change spends in the review process. This change includes various changes to the codebase to bring it up to the new standards. Change-Id: I570d304bca5554404354f972d8a2743279a0171b
48 lines
1016 B
Go
48 lines
1016 B
Go
package errors
|
|
|
|
// AirshipError is the base error type
|
|
// used to create extended error types
|
|
// in other airshipctl packages.
|
|
type AirshipError struct {
|
|
Message string
|
|
}
|
|
|
|
// Error function implments the golang
|
|
// error interface
|
|
func (ae *AirshipError) Error() string {
|
|
return ae.Message
|
|
}
|
|
|
|
// ErrNotImplemented returned for not implemented features
|
|
type ErrNotImplemented struct {
|
|
}
|
|
|
|
func (e ErrNotImplemented) Error() string {
|
|
return "Not implemented"
|
|
}
|
|
|
|
// ErrWrongConfig returned in case of incorrect configuration
|
|
type ErrWrongConfig struct {
|
|
}
|
|
|
|
func (e ErrWrongConfig) Error() string {
|
|
return "Wrong configuration"
|
|
}
|
|
|
|
// ErrMissingConfig returned in case of missing configuration
|
|
type ErrMissingConfig struct {
|
|
What string
|
|
}
|
|
|
|
func (e ErrMissingConfig) Error() string {
|
|
return "Missing configuration: " + e.What
|
|
}
|
|
|
|
// ErrConfigFailed returned in case of failure during configuration
|
|
type ErrConfigFailed struct {
|
|
}
|
|
|
|
func (e ErrConfigFailed) Error() string {
|
|
return "Configuration failed to complete."
|
|
}
|