Skip to content

Commit

Permalink
daemon: fix empty-lines (revive)
Browse files Browse the repository at this point in the history
    daemon/network/filter_test.go:174:19: empty-lines: extra empty line at the end of a block (revive)
    daemon/restart.go:17:116: empty-lines: extra empty line at the end of a block (revive)
    daemon/daemon_linux_test.go:255:41: empty-lines: extra empty line at the end of a block (revive)
    daemon/reload_test.go:340:58: empty-lines: extra empty line at the end of a block (revive)
    daemon/oci_linux.go:495:101: empty-lines: extra empty line at the end of a block (revive)
    daemon/seccomp_linux_test.go:17:36: empty-lines: extra empty line at the start of a block (revive)
    daemon/container_operations.go:560:73: empty-lines: extra empty line at the end of a block (revive)
    daemon/daemon_unix.go:558:76: empty-lines: extra empty line at the end of a block (revive)
    daemon/daemon_unix.go:1092:64: empty-lines: extra empty line at the start of a block (revive)
    daemon/container_operations.go:587:24: empty-lines: extra empty line at the end of a block (revive)
    daemon/network.go:807:18: empty-lines: extra empty line at the end of a block (revive)
    daemon/network.go:813:42: empty-lines: extra empty line at the end of a block (revive)
    daemon/network.go:872:72: 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 05042ce commit ddb42f3
Show file tree
Hide file tree
Showing 9 changed files with 0 additions and 13 deletions.
2 changes: 0 additions & 2 deletions daemon/container_operations.go
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,6 @@ func (daemon *Daemon) allocateNetwork(container *container.Container) (retErr er
if err := daemon.connectToNetwork(container, defaultNetName, nConf.EndpointSettings, updateSettings); err != nil {
return err
}

}

// the intermediate map is necessary because "connectToNetwork" modifies "container.NetworkSettings.Networks"
Expand Down Expand Up @@ -601,7 +600,6 @@ func (daemon *Daemon) allocateNetwork(container *container.Container) (retErr er
}
}()
}

}

if _, err := container.WriteHostConfig(); err != nil {
Expand Down
1 change: 0 additions & 1 deletion daemon/daemon_linux_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -342,5 +342,4 @@ func TestRootMountCleanup(t *testing.T) {
checkMounted(t, cfg.Root, false)
assert.Assert(t, d.cleanupMounts())
})

}
2 changes: 0 additions & 2 deletions daemon/daemon_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,6 @@ func verifyPlatformContainerResources(resources *containertypes.Resources, sysIn
if len(resources.BlkioDeviceWriteBps) > 0 && !sysInfo.BlkioWriteBpsDevice {
warnings = append(warnings, "Your kernel does not support BPS Block I/O write limit or the cgroup is not mounted. Block I/O BPS write limit discarded.")
resources.BlkioDeviceWriteBps = []*pblkiodev.ThrottleDevice{}

}
if len(resources.BlkioDeviceReadIOps) > 0 && !sysInfo.BlkioReadIOpsDevice {
warnings = append(warnings, "Your kernel does not support IOPS Block read limit or the cgroup is not mounted. Block I/O IOPS read limit discarded.")
Expand Down Expand Up @@ -1089,7 +1088,6 @@ func setupInitLayer(idMapping idtools.IdentityMapping) func(string) error {
//
// If names are used, they are verified to exist in passwd/group
func parseRemappedRoot(usergrp string) (string, string, error) {

var (
userID, groupID int
username, groupname string
Expand Down
3 changes: 0 additions & 3 deletions daemon/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -815,7 +815,6 @@ func buildCreateEndpointOptions(c *container.Container, n libnetwork.Network, ep
return nil, errors.Errorf("Invalid link-local IP address: %s", ipam.LinkLocalIPs)
}
ipList = append(ipList, linkip)

}

if ip = net.ParseIP(ipam.IPv4Address); ip == nil && ipam.IPv4Address != "" {
Expand All @@ -828,7 +827,6 @@ func buildCreateEndpointOptions(c *container.Container, n libnetwork.Network, ep

createOptions = append(createOptions,
libnetwork.CreateOptionIpam(ip, ip6, ipList, nil))

}

for _, alias := range epConfig.Aliases {
Expand Down Expand Up @@ -882,7 +880,6 @@ func buildCreateEndpointOptions(c *container.Container, n libnetwork.Network, ep

createOptions = append(createOptions, libnetwork.EndpointOptionGeneric(genericOption))
}

}

// Port-mapping rules belong to the container & applicable only to non-internal networks
Expand Down
1 change: 0 additions & 1 deletion daemon/network/filter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,6 @@ func TestFilterNetworks(t *testing.T) {
if testCase.err != "" {
if err == nil {
t.Fatalf("expect error '%s', got no error", testCase.err)

} else if !strings.Contains(err.Error(), testCase.err) {
t.Fatalf("expect error '%s', got '%s'", testCase.err, err)
}
Expand Down
1 change: 0 additions & 1 deletion daemon/oci_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -706,7 +706,6 @@ func WithMounts(daemon *Daemon, c *container.Container) coci.SpecOpts {
}

return nil

}
}

Expand Down
1 change: 0 additions & 1 deletion daemon/reload_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -404,5 +404,4 @@ func TestDaemonReloadNetworkDiagnosticPort(t *testing.T) {
if !daemon.netController.IsDiagnosticEnabled() {
t.Fatalf("diagnostic should be enable")
}

}
1 change: 0 additions & 1 deletion daemon/restart.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ func (daemon *Daemon) ContainerRestart(ctx context.Context, name string, options
return fmt.Errorf("Cannot restart container %s: %v", name, err)
}
return nil

}

// containerRestart attempts to gracefully stop and then start the
Expand Down
1 change: 0 additions & 1 deletion daemon/seccomp_linux_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import (
)

func TestWithSeccomp(t *testing.T) {

type expected struct {
daemon *Daemon
c *container.Container
Expand Down

0 comments on commit ddb42f3

Please sign in to comment.