lib/snapshot: make golagci-lint happy

This commit is contained in:
Aliaksandr Valialkin 2023-11-15 16:06:00 +01:00
parent 38d074df8e
commit 2ec2deebb2
No known key found for this signature in database
GPG key ID: A72BEC6CD3D0DED1

View file

@ -53,9 +53,8 @@ func Create(createSnapshotURL string) (string, error) {
return snap.Snapshot, nil
} else if snap.Status == "error" {
return "", errors.New(snap.Msg)
} else {
return "", fmt.Errorf("Unkown status: %v", snap.Status)
}
return "", fmt.Errorf("Unkown status: %v", snap.Status)
}
// Delete deletes a snapshot via the provided api endpoint
@ -91,9 +90,8 @@ func Delete(deleteSnapshotURL string, snapshotName string) error {
return nil
} else if snap.Status == "error" {
return errors.New(snap.Msg)
} else {
return fmt.Errorf("Unkown status: %v", snap.Status)
}
return fmt.Errorf("Unkown status: %v", snap.Status)
}
// Validate validates the snapshotName