mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
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
5 changed files with 1 additions and 8 deletions
|
@ -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) {
|
||||
|
|
|
@ -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")
|
||||
}
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -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"])
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue