diff --git a/daemon/discovery.go b/daemon/discovery.go index 6c4bcc43e9..13469464d4 100644 --- a/daemon/discovery.go +++ b/daemon/discovery.go @@ -75,8 +75,8 @@ func discoveryOpts(clusterOpts map[string]string) (time.Duration, time.Duration, return heartbeat, ttl, nil } -// initDiscovery initialized the nodes discovery subsystem by connecting to the specified backend -// and start a registration loop to advertise the current node under the specified address. +// initDiscovery initializes the nodes discovery subsystem by connecting to the specified backend +// and starts a registration loop to advertise the current node under the specified address. func initDiscovery(backendAddress, advertiseAddress string, clusterOpts map[string]string) (discoveryReloader, error) { heartbeat, backend, err := parseDiscoveryOptions(backendAddress, clusterOpts) if err != nil { diff --git a/image/image.go b/image/image.go index e5e4dc6f7e..524714083e 100644 --- a/image/image.go +++ b/image/image.go @@ -29,7 +29,7 @@ type V1Image struct { Created time.Time `json:"created"` // Container is the id of the container used to commit Container string `json:"container,omitempty"` - // ContainerConfig is the configuration of the container that is committed into the image + // ContainerConfig is the configuration of the container that is committed into the image ContainerConfig container.Config `json:"container_config,omitempty"` // DockerVersion specifies version on which image is built DockerVersion string `json:"docker_version,omitempty"` diff --git a/image/rootfs_unix.go b/image/rootfs_unix.go index 285d466b97..99c1f8f4e9 100644 --- a/image/rootfs_unix.go +++ b/image/rootfs_unix.go @@ -6,7 +6,7 @@ import "github.com/docker/docker/layer" // RootFS describes images root filesystem // This is currently a placeholder that only supports layers. In the future -// this can be made into a interface that supports different implementations. +// this can be made into an interface that supports different implementations. type RootFS struct { Type string `json:"type"` DiffIDs []layer.DiffID `json:"diff_ids,omitempty"` diff --git a/image/rootfs_windows.go b/image/rootfs_windows.go index 10b854978c..883d238577 100644 --- a/image/rootfs_windows.go +++ b/image/rootfs_windows.go @@ -12,7 +12,7 @@ import ( // RootFS describes images root filesystem // This is currently a placeholder that only supports layers. In the future -// this can be made into a interface that supports different implementations. +// this can be made into an interface that supports different implementations. type RootFS struct { Type string `json:"type"` DiffIDs []layer.DiffID `json:"diff_ids,omitempty"` diff --git a/layer/layer.go b/layer/layer.go index ef2ac7adc5..bdfe6e75e5 100644 --- a/layer/layer.go +++ b/layer/layer.go @@ -1,11 +1,11 @@ -// Package layer is package for managing read only +// Package layer is package for managing read-only // and read-write mounts on the union file system // driver. Read-only mounts are referenced using a // content hash and are protected from mutation in // the exposed interface. The tar format is used -// to create read only layers and export both -// read only and writable layers. The exported -// tar data for a read only layer should match +// to create read-only layers and export both +// read-only and writable layers. The exported +// tar data for a read-only layer should match // the tar used to create the layer. package layer @@ -75,7 +75,7 @@ type TarStreamer interface { TarStream() (io.ReadCloser, error) } -// Layer represents a read only layer +// Layer represents a read-only layer type Layer interface { TarStreamer @@ -138,7 +138,7 @@ type RWLayer interface { } // Metadata holds information about a -// read only layer +// read-only layer type Metadata struct { // ChainID is the content hash of the layer ChainID ChainID @@ -247,7 +247,7 @@ func ReleaseAndLog(ls Store, l Layer) { LogReleaseMetadata(metadata) } -// LogReleaseMetadata logs a metadata array, use this to +// LogReleaseMetadata logs a metadata array, uses this to // ensure consistent logging for release metadata func LogReleaseMetadata(metadatas []Metadata) { for _, metadata := range metadatas { diff --git a/pkg/system/meminfo_linux.go b/pkg/system/meminfo_linux.go index 66731a9608..385f1d5e73 100644 --- a/pkg/system/meminfo_linux.go +++ b/pkg/system/meminfo_linux.go @@ -11,7 +11,7 @@ import ( ) // ReadMemInfo retrieves memory statistics of the host system and returns a -// MemInfo type. +// MemInfo type. func ReadMemInfo() (*MemInfo, error) { file, err := os.Open("/proc/meminfo") if err != nil { @@ -22,8 +22,7 @@ func ReadMemInfo() (*MemInfo, error) { } // parseMemInfo parses the /proc/meminfo file into -// a MemInfo object given a io.Reader to the file. -// +// a MemInfo object given an io.Reader to the file. // Throws error if there are problems reading from the file func parseMemInfo(reader io.Reader) (*MemInfo, error) { meminfo := &MemInfo{}