Skip to content

Commit ff17a79

Browse files
committed
gofmt code
Signed-off-by: Sebastiaan van Stijn <[email protected]>
1 parent b56cb89 commit ff17a79

2 files changed

Lines changed: 5 additions & 8 deletions

File tree

zfs.go

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -75,11 +75,9 @@ func NewSnapshotter(root string) (snapshots.Snapshotter, error) {
7575
return b, nil
7676
}
7777

78-
var (
79-
zfsCreateProperties = map[string]string{
80-
"mountpoint": "legacy",
81-
}
82-
)
78+
var zfsCreateProperties = map[string]string{
79+
"mountpoint": "legacy",
80+
}
8381

8482
// createFilesystem creates but not mount.
8583
func createFilesystem(datasetName string) (*zfs.Dataset, error) {
@@ -138,7 +136,6 @@ func (z *snapshotter) usage(ctx context.Context, key string) (snapshots.Usage, e
138136
if info.Kind == snapshots.KindActive {
139137
activeName := filepath.Join(z.dataset.Name, id)
140138
sDataset, err := zfs.GetDataset(activeName)
141-
142139
if err != nil {
143140
return snapshots.Usage{}, err
144141
}

zfs_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ func TestZFSUsage(t *testing.T) {
142142
)
143143

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

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

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

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

0 commit comments

Comments
 (0)