Skip to content

Commit

Permalink
Merge pull request moby#21063 from allencloud/fix-typos
Browse files Browse the repository at this point in the history
fix some typos.
  • Loading branch information
aaronlehmann committed Mar 10, 2016
2 parents d99be39 + 34b82a6 commit 49485b7
Show file tree
Hide file tree
Showing 11 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion profiles/apparmor/apparmor.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion profiles/seccomp/seccomp.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions registry/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion runconfig/config_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion runconfig/config_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions volume/drivers/extpoint.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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 == "" {
Expand Down
4 changes: 2 additions & 2 deletions volume/store/store.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion volume/volume.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion volume/volume_propagation_linux.go
Original file line number Diff line number Diff line change
Expand Up @@ -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, ",") {
Expand Down
2 changes: 1 addition & 1 deletion volume/volume_propagation_unsupported.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion volume/volume_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 49485b7

Please sign in to comment.