diff --git a/builder/dockerfile/bflag.go b/builder/dockerfile/bflag.go index c2e6c7dae0..1e03693072 100644 --- a/builder/dockerfile/bflag.go +++ b/builder/dockerfile/bflag.go @@ -29,7 +29,7 @@ type Flag struct { Value string } -// NewBFlags return the new BFlags struct +// NewBFlags returns the new BFlags struct func NewBFlags() *BFlags { return &BFlags{ flags: make(map[string]*Flag), diff --git a/daemon/discovery_test.go b/daemon/discovery_test.go index 1764af1e9f..65511b90f6 100644 --- a/daemon/discovery_test.go +++ b/daemon/discovery_test.go @@ -37,7 +37,7 @@ func TestDiscoveryOpts(t *testing.T) { } if heartbeat != 10*time.Second { - t.Fatalf("Heatbeat - Expected : %v, Actual : %v", 10*time.Second, heartbeat) + t.Fatalf("Heartbeat - Expected : %v, Actual : %v", 10*time.Second, heartbeat) } if ttl != 20*time.Second { @@ -51,7 +51,7 @@ func TestDiscoveryOpts(t *testing.T) { } if heartbeat != 10*time.Second { - t.Fatalf("Heatbeat - Expected : %v, Actual : %v", 10*time.Second, heartbeat) + t.Fatalf("Heartbeat - Expected : %v, Actual : %v", 10*time.Second, heartbeat) } expected := 10 * defaultDiscoveryTTLFactor * time.Second @@ -71,7 +71,7 @@ func TestDiscoveryOpts(t *testing.T) { expected = 30 * time.Second / defaultDiscoveryTTLFactor if heartbeat != expected { - t.Fatalf("Heatbeat - Expected : %v, Actual : %v", expected, heartbeat) + t.Fatalf("Heartbeat - Expected : %v, Actual : %v", expected, heartbeat) } clusterOpts = map[string]string{} @@ -81,7 +81,7 @@ func TestDiscoveryOpts(t *testing.T) { } if heartbeat != defaultDiscoveryHeartbeat { - t.Fatalf("Heatbeat - Expected : %v, Actual : %v", defaultDiscoveryHeartbeat, heartbeat) + t.Fatalf("Heartbeat - Expected : %v, Actual : %v", defaultDiscoveryHeartbeat, heartbeat) } expected = defaultDiscoveryHeartbeat * defaultDiscoveryTTLFactor diff --git a/libcontainerd/types_linux.go b/libcontainerd/types_linux.go index 86a42d2c1f..bc19ece812 100644 --- a/libcontainerd/types_linux.go +++ b/libcontainerd/types_linux.go @@ -44,7 +44,7 @@ type StateInfo struct { // Stats contains a stats properties from containerd. type Stats containerd.StatsResponse -// Summary container a container summary from containerd +// Summary contains a container summary from containerd type Summary struct{} // User specifies linux specific user and group information for the container's diff --git a/libcontainerd/types_solaris.go b/libcontainerd/types_solaris.go index f107ac0ebc..e818d49ac1 100644 --- a/libcontainerd/types_solaris.go +++ b/libcontainerd/types_solaris.go @@ -20,7 +20,7 @@ type Process struct { // Stats contains a stats properties from containerd. type Stats struct{} -// Summary container a container summary from containerd +// Summary contains a container summary from containerd type Summary struct{} // StateInfo contains description about the new state container has entered. diff --git a/libcontainerd/types_windows.go b/libcontainerd/types_windows.go index 4f8d325296..65264a9811 100644 --- a/libcontainerd/types_windows.go +++ b/libcontainerd/types_windows.go @@ -11,7 +11,7 @@ type Process windowsoci.Process // User specifies user information for the containers main process. type User windowsoci.User -// Summary container a container summary from containerd +// Summary contains a container summary from containerd type Summary struct { Pid uint32 Command string diff --git a/libcontainerd/utils_windows.go b/libcontainerd/utils_windows.go index 1839dc19a1..2126f6457f 100644 --- a/libcontainerd/utils_windows.go +++ b/libcontainerd/utils_windows.go @@ -5,7 +5,7 @@ import ( "strings" ) -// setupEnvironmentVariables convert a string array of environment variables +// setupEnvironmentVariables converts a string array of environment variables // into a map as required by the HCS. Source array is in format [v1=k1] [v2=k2] etc. func setupEnvironmentVariables(a []string) map[string]string { r := make(map[string]string) diff --git a/libcontainerd/windowsoci/oci_windows.go b/libcontainerd/windowsoci/oci_windows.go index 5f8f1319d2..f38dcd33c0 100644 --- a/libcontainerd/windowsoci/oci_windows.go +++ b/libcontainerd/windowsoci/oci_windows.go @@ -29,13 +29,13 @@ type Spec struct { Root Root `json:"root"` // Hostname is the container's host name. Hostname string `json:"hostname,omitempty"` - // Mounts profile configuration for adding mounts to the container's filesystem. + // Mounts profiles configuration for adding mounts to the container's filesystem. Mounts []Mount `json:"mounts"` } // Windows contains platform specific configuration for Windows based containers. type Windows struct { - // Resources contain information for handling resource constraints for the container + // Resources contains information for handling resource constraints for the container Resources *Resources `json:"resources,omitempty"` // Networking contains the platform specific network settings for the container. Networking *Networking `json:"networking,omitempty"` @@ -143,7 +143,7 @@ type CPU struct { Percent *int64 `json:"percent,omitempty"` } -// Network network resource management information +// Network contains network resource management information type Network struct { // Bandwidth is the maximum egress bandwidth in bytes per second Bandwidth *uint64 `json:"bandwidth,omitempty"` diff --git a/opts/opts.go b/opts/opts.go index 1b9d6b294a..20f4c655a1 100644 --- a/opts/opts.go +++ b/opts/opts.go @@ -136,7 +136,7 @@ func (o *NamedListOpts) Name() string { return o.name } -//MapOpts holds a map of values and a validation function. +// MapOpts holds a map of values and a validation function. type MapOpts struct { values map[string]string validator ValidatorFctType