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:
parent
e9f1b83a4a
commit
188724a597
|
@ -26,7 +26,6 @@ func TestGetAddress(t *testing.T) {
|
||||||
t.Errorf("Test case failed for %s actual: %s expected : %s", name, v, success)
|
t.Errorf("Test case failed for %s actual: %s expected : %s", name, v, success)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestGetPassword(t *testing.T) {
|
func TestGetPassword(t *testing.T) {
|
||||||
|
|
|
@ -143,10 +143,7 @@ func (v *localVolume) postMount() error {
|
||||||
}
|
}
|
||||||
if v.opts.Quota.Size > 0 {
|
if v.opts.Quota.Size > 0 {
|
||||||
if v.quotaCtl != nil {
|
if v.quotaCtl != nil {
|
||||||
err := v.quotaCtl.SetQuota(v.path, v.opts.Quota)
|
return v.quotaCtl.SetQuota(v.path, v.opts.Quota)
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
return errors.New("size quota requested for volume but no quota support")
|
return errors.New("size quota requested for volume but no quota support")
|
||||||
}
|
}
|
||||||
|
|
|
@ -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)
|
t.Errorf("Expected mount copy data to match. Expected: '%v', Actual: '%v'", c.expected.CopyData, mp.CopyData)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -128,7 +128,6 @@ func (p *windowsParser) splitRawSpec(raw string, splitRegexp *regexp.Regexp) ([]
|
||||||
exists, isDir, _ := p.fi.fileInfo(matchgroups["destination"])
|
exists, isDir, _ := p.fi.fileInfo(matchgroups["destination"])
|
||||||
if exists && !isDir {
|
if exists && !isDir {
|
||||||
return nil, fmt.Errorf("file '%s' cannot be mapped. Only directories can be mapped on this platform", matchgroups["destination"])
|
return nil, fmt.Errorf("file '%s' cannot be mapped. Only directories can be mapped on this platform", matchgroups["destination"])
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,7 +45,6 @@ func TestServiceCreate(t *testing.T) {
|
||||||
assert.NilError(t, err)
|
assert.NilError(t, err)
|
||||||
_, err = service.Create(ctx, "v1", "d2")
|
_, err = service.Create(ctx, "v1", "d2")
|
||||||
assert.NilError(t, err)
|
assert.NilError(t, err)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestServiceList(t *testing.T) {
|
func TestServiceList(t *testing.T) {
|
||||||
|
|
Loading…
Reference in New Issue