Skip to content

Commit

Permalink
Make lint happy
Browse files Browse the repository at this point in the history
Signed-off-by: David Cassany <[email protected]>
  • Loading branch information
davidcassany committed Nov 13, 2024
1 parent 6dc2a6d commit 6b39b8c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
5 changes: 3 additions & 2 deletions pkg/snapshotter/btrfs.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ package snapshotter
import (
"bufio"
"encoding/xml"
"errors"
"fmt"
"path/filepath"
"regexp"
Expand Down Expand Up @@ -124,7 +125,7 @@ func newBtrfsSnapshotter(cfg types.Config, snapCfg types.SnapshotterConfig, boot
if !ok {
msg := "failed casting BtrfsConfig type"
cfg.Logger.Errorf(msg)
return nil, fmt.Errorf(msg)
return nil, errors.New(msg)
}
}
return &Btrfs{
Expand Down Expand Up @@ -429,7 +430,7 @@ func (b *Btrfs) SnapshotToImageSource(snap *types.Snapshot) (*types.ImageSource,
msg := fmt.Sprintf("snapshot path does not exist: %s.", snap.Path)
b.cfg.Logger.Errorf(msg)
if err == nil {
err = fmt.Errorf(msg)
err = errors.New(msg)
}
return nil, err
}
Expand Down
3 changes: 2 additions & 1 deletion pkg/snapshotter/loopdevice.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package snapshotter

import (
"bufio"
"errors"
"fmt"
"path/filepath"
"regexp"
Expand Down Expand Up @@ -71,7 +72,7 @@ func newLoopDeviceSnapshotter(cfg types.Config, snapCfg types.SnapshotterConfig,
if !ok {
msg := "failed casting LoopDeviceConfig type"
cfg.Logger.Errorf(msg)
return nil, fmt.Errorf(msg)
return nil, errors.New(msg)
}
}
return &LoopDevice{cfg: cfg, snapshotterCfg: snapCfg, loopDevCfg: *loopDevCfg, bootloader: bootloader}, nil
Expand Down

0 comments on commit 6b39b8c

Please sign in to comment.