Skip to content

Commit

Permalink
volume: fix empty-lines (revive)
Browse files Browse the repository at this point in the history
    volume/mounts/parser_test.go:42:39: empty-lines: extra empty line at the end of a block (revive)
    volume/mounts/windows_parser.go:129:24: empty-lines: extra empty line at the end of a block (revive)
    volume/local/local_test.go:16:35: empty-lines: extra empty line at the end of a block (revive)
    volume/local/local_unix.go:145:3: early-return: if c {...} else {... return } can be simplified to if !c { ... return } ... (revive)
    volume/service/service_test.go:18:38: empty-lines: extra empty line at the end of a block (revive)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
  • Loading branch information
thaJeztah committed Sep 27, 2022
1 parent e9f1b83 commit 188724a
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 8 deletions.
1 change: 0 additions & 1 deletion volume/local/local_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ func TestGetAddress(t *testing.T) {
t.Errorf("Test case failed for %s actual: %s expected : %s", name, v, success)
}
}

}

func TestGetPassword(t *testing.T) {
Expand Down
5 changes: 1 addition & 4 deletions volume/local/local_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,10 +143,7 @@ func (v *localVolume) postMount() error {
}
if v.opts.Quota.Size > 0 {
if v.quotaCtl != nil {
err := v.quotaCtl.SetQuota(v.path, v.opts.Quota)
if err != nil {
return err
}
return v.quotaCtl.SetQuota(v.path, v.opts.Quota)
} else {
return errors.New("size quota requested for volume but no quota support")
}
Expand Down
1 change: 0 additions & 1 deletion volume/mounts/parser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,5 +87,4 @@ func TestParseMountSpec(t *testing.T) {
t.Errorf("Expected mount copy data to match. Expected: '%v', Actual: '%v'", c.expected.CopyData, mp.CopyData)
}
}

}
1 change: 0 additions & 1 deletion volume/mounts/windows_parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,6 @@ func (p *windowsParser) splitRawSpec(raw string, splitRegexp *regexp.Regexp) ([]
exists, isDir, _ := p.fi.fileInfo(matchgroups["destination"])
if exists && !isDir {
return nil, fmt.Errorf("file '%s' cannot be mapped. Only directories can be mapped on this platform", matchgroups["destination"])

}
}
}
Expand Down
1 change: 0 additions & 1 deletion volume/service/service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ func TestServiceCreate(t *testing.T) {
assert.NilError(t, err)
_, err = service.Create(ctx, "v1", "d2")
assert.NilError(t, err)

}

func TestServiceList(t *testing.T) {
Expand Down

0 comments on commit 188724a

Please sign in to comment.