Rework error messages
This commit reworks error messages for all commands and makes sure they pass liniting.
This commit is contained in:
parent
d22784e6f5
commit
c31c46ee44
40 changed files with 249 additions and 110 deletions
|
|
@ -35,13 +35,18 @@ var errSnapshotFailed = exit.Error{
|
|||
ExitCode: exit.ExitGeneric,
|
||||
}
|
||||
|
||||
var errSnapshotWissKI = exit.Error{
|
||||
Message: "unable to find WissKI",
|
||||
ExitCode: exit.ExitGeneric,
|
||||
}
|
||||
|
||||
func (sn snapshot) Run(context wisski_distillery.Context) error {
|
||||
dis := context.Environment
|
||||
|
||||
// find the instance!
|
||||
instance, err := dis.Instances().WissKI(context.Context, sn.Positionals.Slug)
|
||||
if err != nil {
|
||||
return err
|
||||
return errSnapshotWissKI.Wrap(err)
|
||||
}
|
||||
|
||||
// do a snapshot of it!
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue