diff --git a/profiles/apparmor/apparmor.go b/profiles/apparmor/apparmor.go index ab139a860a..e392b2c692 100644 --- a/profiles/apparmor/apparmor.go +++ b/profiles/apparmor/apparmor.go @@ -89,7 +89,7 @@ func InstallDefault(name string) error { return nil } -// IsLoaded checks if a passed profile as been loaded into the kernel. +// IsLoaded checks if a passed profile has been loaded into the kernel. func IsLoaded(name string) error { file, err := os.Open("/sys/kernel/security/apparmor/profiles") if err != nil { diff --git a/profiles/seccomp/seccomp.go b/profiles/seccomp/seccomp.go index 8657860965..12b78e3296 100644 --- a/profiles/seccomp/seccomp.go +++ b/profiles/seccomp/seccomp.go @@ -18,7 +18,7 @@ func GetDefaultProfile() (*configs.Seccomp, error) { return setupSeccomp(DefaultProfile) } -// LoadProfile takes a file path a decodes the seccomp profile. +// LoadProfile takes a file path and decodes the seccomp profile. func LoadProfile(body string) (*configs.Seccomp, error) { var config types.Seccomp if err := json.Unmarshal([]byte(body), &config); err != nil { diff --git a/registry/service.go b/registry/service.go index 2124da6d9f..d9ea71b372 100644 --- a/registry/service.go +++ b/registry/service.go @@ -145,14 +145,14 @@ func (s *Service) tlsConfigForMirror(mirrorURL *url.URL) (*tls.Config, error) { return s.TLSConfig(mirrorURL.Host) } -// LookupPullEndpoints creates an list of endpoints to try to pull from, in order of preference. +// LookupPullEndpoints creates a list of endpoints to try to pull from, in order of preference. // It gives preference to v2 endpoints over v1, mirrors over the actual // registry, and HTTPS over plain HTTP. func (s *Service) LookupPullEndpoints(hostname string) (endpoints []APIEndpoint, err error) { return s.lookupEndpoints(hostname) } -// LookupPushEndpoints creates an list of endpoints to try to push to, in order of preference. +// LookupPushEndpoints creates a list of endpoints to try to push to, in order of preference. // It gives preference to v2 endpoints over v1, and HTTPS over plain HTTP. // Mirrors are not included. func (s *Service) LookupPushEndpoints(hostname string) (endpoints []APIEndpoint, err error) { diff --git a/runconfig/config_unix.go b/runconfig/config_unix.go index 16a8d94d4a..e5902fb024 100644 --- a/runconfig/config_unix.go +++ b/runconfig/config_unix.go @@ -7,7 +7,7 @@ import ( networktypes "github.com/docker/engine-api/types/network" ) -// ContainerConfigWrapper is a Config wrapper that hold the container Config (portable) +// ContainerConfigWrapper is a Config wrapper that holds the container Config (portable) // and the corresponding HostConfig (non-portable). type ContainerConfigWrapper struct { *container.Config diff --git a/runconfig/config_windows.go b/runconfig/config_windows.go index 08d9b023ec..50a5238000 100644 --- a/runconfig/config_windows.go +++ b/runconfig/config_windows.go @@ -5,7 +5,7 @@ import ( networktypes "github.com/docker/engine-api/types/network" ) -// ContainerConfigWrapper is a Config wrapper that hold the container Config (portable) +// ContainerConfigWrapper is a Config wrapper that holds the container Config (portable) // and the corresponding HostConfig (non-portable). type ContainerConfigWrapper struct { *container.Config diff --git a/volume/drivers/extpoint.go b/volume/drivers/extpoint.go index 8369822b51..d705b8a597 100644 --- a/volume/drivers/extpoint.go +++ b/volume/drivers/extpoint.go @@ -71,7 +71,7 @@ func Register(extension volume.Driver, name string) bool { return true } -// Unregister dissociates the name from it's driver, if the association exists. +// Unregister dissociates the name from its driver, if the association exists. func Unregister(name string) bool { drivers.Lock() defer drivers.Unlock() @@ -114,7 +114,7 @@ func Lookup(name string) (volume.Driver, error) { return d, nil } -// GetDriver returns a volume driver by it's name. +// GetDriver returns a volume driver by its name. // If the driver is empty, it looks for the local driver. func GetDriver(name string) (volume.Driver, error) { if name == "" { diff --git a/volume/store/store.go b/volume/store/store.go index 8e023df45b..6fe0717b26 100644 --- a/volume/store/store.go +++ b/volume/store/store.go @@ -54,7 +54,7 @@ type VolumeStore struct { } // List proxies to all registered volume drivers to get the full list of volumes -// If a driver returns a volume that has name which conflicts with a another volume from a different driver, +// If a driver returns a volume that has name which conflicts with another volume from a different driver, // the first volume is chosen and the conflicting volume is dropped. func (s *VolumeStore) List() ([]volume.Volume, []string, error) { vols, warnings, err := s.list() @@ -244,7 +244,7 @@ func (s *VolumeStore) Get(name string) (volume.Volume, error) { return v, nil } -// get requests the volume, if the driver info is stored it just access that driver, +// getVolume requests the volume, if the driver info is stored it just accesses that driver, // if the driver is unknown it probes all drivers until it finds the first volume with that name. // it is expected that callers of this function hold any necessary locks func (s *VolumeStore) getVolume(name string) (volume.Volume, error) { diff --git a/volume/volume.go b/volume/volume.go index 244c4d682c..c3f23bbedd 100644 --- a/volume/volume.go +++ b/volume/volume.go @@ -93,7 +93,7 @@ func (m *MountPoint) Path() string { return m.Source } -// ParseVolumesFrom ensure that the supplied volumes-from is valid. +// ParseVolumesFrom ensures that the supplied volumes-from is valid. func ParseVolumesFrom(spec string) (string, string, error) { if len(spec) == 0 { return "", "", fmt.Errorf("malformed volumes-from specification: %s", spec) diff --git a/volume/volume_propagation_linux.go b/volume/volume_propagation_linux.go index 83f2df25be..f5f28205a0 100644 --- a/volume/volume_propagation_linux.go +++ b/volume/volume_propagation_linux.go @@ -32,7 +32,7 @@ func GetPropagation(mode string) string { } // HasPropagation checks if there is a valid propagation mode present in -// passed string. Returns true if a valid propagatio mode specifier is +// passed string. Returns true if a valid propagation mode specifier is // present, false otherwise. func HasPropagation(mode string) bool { for _, o := range strings.Split(mode, ",") { diff --git a/volume/volume_propagation_unsupported.go b/volume/volume_propagation_unsupported.go index 85e4d46b33..0edc89abe3 100644 --- a/volume/volume_propagation_unsupported.go +++ b/volume/volume_propagation_unsupported.go @@ -15,7 +15,7 @@ func GetPropagation(mode string) string { } // HasPropagation checks if there is a valid propagation mode present in -// passed string. Returns true if a valid propagatio mode specifier is +// passed string. Returns true if a valid propagation mode specifier is // present, false otherwise. func HasPropagation(mode string) bool { return false diff --git a/volume/volume_unix.go b/volume/volume_unix.go index 07020a925c..acd0b1bcd0 100644 --- a/volume/volume_unix.go +++ b/volume/volume_unix.go @@ -161,7 +161,7 @@ func ValidMountMode(mode string) bool { // ReadWrite tells you if a mode string is a valid read-write mode or not. // If there are no specifications w.r.t read write mode, then by default -// it returs true. +// it returns true. func ReadWrite(mode string) bool { if !ValidMountMode(mode) { return false