Skip to content

Commit

Permalink
lxc: Use errors.New instead of fmt.Errorf
Browse files Browse the repository at this point in the history
Signed-off-by: Mark Bolton <[email protected]>
  • Loading branch information
boltmark committed Sep 4, 2024
1 parent 7eedd44 commit e0ae8cf
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lxc/storage_bucket.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package main

import (
"errors"
"fmt"
"io"
"net/url"
Expand Down Expand Up @@ -1270,12 +1271,12 @@ func (c *cmdStorageBucketExport) Run(cmd *cobra.Command, args []string) error {

pool := resources[0]
if pool.name == "" {
return fmt.Errorf(i18n.G("Missing pool name"))
return errors.New(i18n.G("Missing pool name"))
}

bucketName := args[1]
if bucketName == "" {
return fmt.Errorf(i18n.G("Missing bucket name"))
return errors.New(i18n.G("Missing bucket name"))
}

client := pool.server
Expand Down

0 comments on commit e0ae8cf

Please sign in to comment.