chinampa/pkg/errors/errors.go

23 lines
459 B
Go
Raw Permalink Normal View History

2022-12-19 03:04:34 +00:00
// Copyright © 2022 Roberto Hidalgo <chinampa@un.rob.mx>
2022-12-31 05:53:24 +00:00
// SPDX-License-Identifier: Apache-2.0
2022-12-19 03:04:34 +00:00
package errors
// NotFound happens when a sub-command was not found.
2022-12-19 03:04:34 +00:00
type NotFound struct {
Msg string
Group []string
}
// BadArguments happens when the user provided incorrect arguments or options.
2022-12-19 03:04:34 +00:00
type BadArguments struct {
Msg string
}
func (err NotFound) Error() string {
return err.Msg
}
func (err BadArguments) Error() string {
return err.Msg
}