Bläddra i källkod

runconfig, oci, image, layer, distribution: fix empty-lines (revive)

    runconfig/config_test.go:23:46: empty-lines: extra empty line at the start of a block (revive)
    runconfig/config_test.go:75:55: empty-lines: extra empty line at the start of a block (revive)

    oci/devices_linux.go:57:34: empty-lines: extra empty line at the start of a block (revive)
    oci/devices_linux.go:60:69: empty-lines: extra empty line at the start of a block (revive)

    image/fs_test.go:53:38: empty-lines: extra empty line at the end of a block (revive)
    image/tarexport/save.go:88:29: empty-lines: extra empty line at the end of a block (revive)

    layer/layer_unix_test.go:21:34: empty-lines: extra empty line at the end of a block (revive)

    distribution/xfer/download.go:302:9: empty-lines: extra empty line at the end of a block (revive)
    distribution/manifest_test.go:154:99: empty-lines: extra empty line at the end of a block (revive)
    distribution/manifest_test.go:329:52: empty-lines: extra empty line at the end of a block (revive)
    distribution/manifest_test.go:354:59: empty-lines: extra empty line at the end of a block (revive)

    registry/config_test.go:323:42: empty-lines: extra empty line at the end of a block (revive)
    registry/config_test.go:350:33: empty-lines: extra empty line at the end of a block (revive)

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 8a2e1245d42d3fb1d27e61b83774354129eb123a)
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Sebastiaan van Stijn 2 år sedan
förälder
incheckning
f8e5145e96

+ 0 - 3
distribution/manifest_test.go

@@ -171,7 +171,6 @@ func TestManifestStore(t *testing.T) {
 
 		err = w.Commit(ctx, desc.Size, desc.Digest, opts...)
 		assert.NilError(t, err)
-
 	}
 
 	// All tests should end up with no active ingest
@@ -348,7 +347,6 @@ func TestDetectManifestBlobMediaType(t *testing.T) {
 			assert.Equal(t, mt, tc.expected)
 		})
 	}
-
 }
 
 func TestDetectManifestBlobMediaTypeInvalid(t *testing.T) {
@@ -418,5 +416,4 @@ func TestDetectManifestBlobMediaTypeInvalid(t *testing.T) {
 			assert.Equal(t, mt, "")
 		})
 	}
-
 }

+ 0 - 1
distribution/xfer/download.go

@@ -313,7 +313,6 @@ func (ldm *LayerDownloadManager) makeDownloadFunc(descriptor DownloadDescriptor,
 						d.err = errors.New("download cancelled during retry delay")
 						return
 					}
-
 				}
 			}
 

+ 0 - 1
image/fs_test.go

@@ -78,7 +78,6 @@ func TestFSInvalidRoot(t *testing.T) {
 
 		os.RemoveAll(root)
 	}
-
 }
 
 func TestFSMetadataGetSet(t *testing.T) {

+ 0 - 1
image/tarexport/save.go

@@ -138,7 +138,6 @@ func (l *tarexporter) parseNames(names []string) (desc map[image.ID]*imageDescri
 		if err := addAssoc(image.IDFromDigest(id), namedRef); err != nil {
 			return nil, err
 		}
-
 	}
 	return imgDescr, nil
 }

+ 0 - 1
layer/layer_unix_test.go

@@ -63,5 +63,4 @@ func TestLayerSize(t *testing.T) {
 	if expected := len(content1) + len(content2); int(layer2Size) != expected {
 		t.Fatalf("Unexpected size %d, expected %d", layer2Size, expected)
 	}
-
 }

+ 0 - 2
oci/devices_linux.go

@@ -55,10 +55,8 @@ func DevicesFromPath(pathOnHost, pathInContainer, cgroupPermissions string) (dev
 	// if the device is not a device node
 	// try to see if it's a directory holding many devices
 	if err == devices.ErrNotADevice {
-
 		// check if it is a directory
 		if src, e := os.Stat(resolvedPathOnHost); e == nil && src.IsDir() {
-
 			// mount the internal devices recursively
 			// TODO check if additional errors should be handled or logged
 			_ = filepath.Walk(resolvedPathOnHost, func(dpath string, f os.FileInfo, _ error) error {

+ 0 - 2
registry/config_test.go

@@ -352,9 +352,7 @@ func TestValidateIndexName(t *testing.T) {
 		if assert.Check(t, err) {
 			assert.Check(t, is.Equal(testCase.expect, result))
 		}
-
 	}
-
 }
 
 func TestValidateIndexNameWithError(t *testing.T) {

+ 0 - 2
runconfig/config_test.go

@@ -21,7 +21,6 @@ type f struct {
 }
 
 func TestDecodeContainerConfig(t *testing.T) {
-
 	var (
 		fixtures []f
 		image    string
@@ -73,7 +72,6 @@ func TestDecodeContainerConfig(t *testing.T) {
 // to the daemon in the hostConfig structure. Note this is platform specific
 // as to what level of container isolation is supported.
 func TestDecodeContainerConfigIsolation(t *testing.T) {
-
 	// An Invalid isolation level
 	if _, _, _, err := callDecodeContainerConfigIsolation("invalid"); err != nil {
 		if !strings.Contains(err.Error(), `Invalid isolation: "invalid"`) {