volume: fix empty-lines (revive)

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>
This commit is contained in:
Sebastiaan van Stijn 2022-09-23 22:28:03 +02:00
parent e9f1b83a4a
commit 188724a597
No known key found for this signature in database
GPG Key ID: 76698F39D527CE8C
5 changed files with 1 additions and 8 deletions

View File

@ -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) {

View File

@ -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")
}

View File

@ -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)
}
}
}

View File

@ -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"])
}
}
}

View File

@ -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) {