Skip to content

Commit

Permalink
gofmt code
Browse files Browse the repository at this point in the history
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
  • Loading branch information
thaJeztah committed May 25, 2023
1 parent b56cb89 commit ff17a79
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
9 changes: 3 additions & 6 deletions zfs.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,9 @@ func NewSnapshotter(root string) (snapshots.Snapshotter, error) {
return b, nil
}

var (
zfsCreateProperties = map[string]string{
"mountpoint": "legacy",
}
)
var zfsCreateProperties = map[string]string{
"mountpoint": "legacy",
}

// createFilesystem creates but not mount.
func createFilesystem(datasetName string) (*zfs.Dataset, error) {
Expand Down Expand Up @@ -138,7 +136,6 @@ func (z *snapshotter) usage(ctx context.Context, key string) (snapshots.Usage, e
if info.Kind == snapshots.KindActive {
activeName := filepath.Join(z.dataset.Name, id)
sDataset, err := zfs.GetDataset(activeName)

if err != nil {
return snapshots.Usage{}, err
}
Expand Down
4 changes: 2 additions & 2 deletions zfs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ func TestZFSUsage(t *testing.T) {
)

// Create a child layer with a 1MB file
baseApplier := fstest.Apply(fstest.CreateRandomFile("/a", 12345679, oneMB, 0777))
baseApplier := fstest.Apply(fstest.CreateRandomFile("/a", 12345679, oneMB, 0o777))

target = filepath.Join(root, "prepare-2")
mounts, err := z.Prepare(ctx, target, filepath.Join(root, "layer-1"))
Expand Down Expand Up @@ -172,7 +172,7 @@ func TestZFSUsage(t *testing.T) {
}

// Create another child layer with a 2MB file
baseApplier = fstest.Apply(fstest.CreateRandomFile("/b", 12345679, twoMB, 0777))
baseApplier = fstest.Apply(fstest.CreateRandomFile("/b", 12345679, twoMB, 0o777))

target = filepath.Join(root, "prepare-3")
mounts, err = z.Prepare(ctx, target, filepath.Join(root, "layer-2"))
Expand Down

0 comments on commit ff17a79

Please sign in to comment.