Merge pull request #21063 from allencloud/fix-typos

fix some typos.
This commit is contained in:
Aaron Lehmann 2016-03-09 20:24:56 -08:00
commit 49485b769c
11 changed files with 14 additions and 14 deletions

View file

@ -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 {

View file

@ -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 {

View file

@ -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) {

View file

@ -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

View file

@ -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

View file

@ -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 == "" {

View file

@ -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) {

View file

@ -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)

View file

@ -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, ",") {

View file

@ -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

View file

@ -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