cli/command: remove errdefs uses

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn
2025-05-16 20:18:06 +02:00
parent eebf6824fc
commit 1058b22800
3 changed files with 27 additions and 10 deletions

View File

@ -151,3 +151,22 @@ func ValidateOutputPathFileMode(fileMode os.FileMode) error {
}
return nil
}
func invalidParameter(err error) error {
return invalidParameterErr{err}
}
type invalidParameterErr struct{ error }
func (invalidParameterErr) InvalidParameter() {}
func notFound(err error) error {
return notFoundErr{err}
}
type notFoundErr struct{ error }
func (notFoundErr) NotFound() {}
func (e notFoundErr) Unwrap() error {
return e.error
}