Browse code

Merge pull request #21063 from allencloud/fix-typos

fix some typos.

Aaron Lehmann authored on 2016/03/10 13:24:56
Showing 11 changed files
... ...
@@ -89,7 +89,7 @@ func InstallDefault(name string) error {
89 89
 	return nil
90 90
 }
91 91
 
92
-// IsLoaded checks if a passed profile as been loaded into the kernel.
92
+// IsLoaded checks if a passed profile has been loaded into the kernel.
93 93
 func IsLoaded(name string) error {
94 94
 	file, err := os.Open("/sys/kernel/security/apparmor/profiles")
95 95
 	if err != nil {
... ...
@@ -18,7 +18,7 @@ func GetDefaultProfile() (*configs.Seccomp, error) {
18 18
 	return setupSeccomp(DefaultProfile)
19 19
 }
20 20
 
21
-// LoadProfile takes a file path a decodes the seccomp profile.
21
+// LoadProfile takes a file path and decodes the seccomp profile.
22 22
 func LoadProfile(body string) (*configs.Seccomp, error) {
23 23
 	var config types.Seccomp
24 24
 	if err := json.Unmarshal([]byte(body), &config); err != nil {
... ...
@@ -145,14 +145,14 @@ func (s *Service) tlsConfigForMirror(mirrorURL *url.URL) (*tls.Config, error) {
145 145
 	return s.TLSConfig(mirrorURL.Host)
146 146
 }
147 147
 
148
-// LookupPullEndpoints creates an list of endpoints to try to pull from, in order of preference.
148
+// LookupPullEndpoints creates a list of endpoints to try to pull from, in order of preference.
149 149
 // It gives preference to v2 endpoints over v1, mirrors over the actual
150 150
 // registry, and HTTPS over plain HTTP.
151 151
 func (s *Service) LookupPullEndpoints(hostname string) (endpoints []APIEndpoint, err error) {
152 152
 	return s.lookupEndpoints(hostname)
153 153
 }
154 154
 
155
-// LookupPushEndpoints creates an list of endpoints to try to push to, in order of preference.
155
+// LookupPushEndpoints creates a list of endpoints to try to push to, in order of preference.
156 156
 // It gives preference to v2 endpoints over v1, and HTTPS over plain HTTP.
157 157
 // Mirrors are not included.
158 158
 func (s *Service) LookupPushEndpoints(hostname string) (endpoints []APIEndpoint, err error) {
... ...
@@ -7,7 +7,7 @@ import (
7 7
 	networktypes "github.com/docker/engine-api/types/network"
8 8
 )
9 9
 
10
-// ContainerConfigWrapper is a Config wrapper that hold the container Config (portable)
10
+// ContainerConfigWrapper is a Config wrapper that holds the container Config (portable)
11 11
 // and the corresponding HostConfig (non-portable).
12 12
 type ContainerConfigWrapper struct {
13 13
 	*container.Config
... ...
@@ -5,7 +5,7 @@ import (
5 5
 	networktypes "github.com/docker/engine-api/types/network"
6 6
 )
7 7
 
8
-// ContainerConfigWrapper is a Config wrapper that hold the container Config (portable)
8
+// ContainerConfigWrapper is a Config wrapper that holds the container Config (portable)
9 9
 // and the corresponding HostConfig (non-portable).
10 10
 type ContainerConfigWrapper struct {
11 11
 	*container.Config
... ...
@@ -71,7 +71,7 @@ func Register(extension volume.Driver, name string) bool {
71 71
 	return true
72 72
 }
73 73
 
74
-// Unregister dissociates the name from it's driver, if the association exists.
74
+// Unregister dissociates the name from its driver, if the association exists.
75 75
 func Unregister(name string) bool {
76 76
 	drivers.Lock()
77 77
 	defer drivers.Unlock()
... ...
@@ -114,7 +114,7 @@ func Lookup(name string) (volume.Driver, error) {
114 114
 	return d, nil
115 115
 }
116 116
 
117
-// GetDriver returns a volume driver by it's name.
117
+// GetDriver returns a volume driver by its name.
118 118
 // If the driver is empty, it looks for the local driver.
119 119
 func GetDriver(name string) (volume.Driver, error) {
120 120
 	if name == "" {
... ...
@@ -54,7 +54,7 @@ type VolumeStore struct {
54 54
 }
55 55
 
56 56
 // List proxies to all registered volume drivers to get the full list of volumes
57
-// If a driver returns a volume that has name which conflicts with a another volume from a different driver,
57
+// If a driver returns a volume that has name which conflicts with another volume from a different driver,
58 58
 // the first volume is chosen and the conflicting volume is dropped.
59 59
 func (s *VolumeStore) List() ([]volume.Volume, []string, error) {
60 60
 	vols, warnings, err := s.list()
... ...
@@ -244,7 +244,7 @@ func (s *VolumeStore) Get(name string) (volume.Volume, error) {
244 244
 	return v, nil
245 245
 }
246 246
 
247
-// get requests the volume, if the driver info is stored it just access that driver,
247
+// getVolume requests the volume, if the driver info is stored it just accesses that driver,
248 248
 // if the driver is unknown it probes all drivers until it finds the first volume with that name.
249 249
 // it is expected that callers of this function hold any necessary locks
250 250
 func (s *VolumeStore) getVolume(name string) (volume.Volume, error) {
... ...
@@ -93,7 +93,7 @@ func (m *MountPoint) Path() string {
93 93
 	return m.Source
94 94
 }
95 95
 
96
-// ParseVolumesFrom ensure that the supplied volumes-from is valid.
96
+// ParseVolumesFrom ensures that the supplied volumes-from is valid.
97 97
 func ParseVolumesFrom(spec string) (string, string, error) {
98 98
 	if len(spec) == 0 {
99 99
 		return "", "", fmt.Errorf("malformed volumes-from specification: %s", spec)
... ...
@@ -32,7 +32,7 @@ func GetPropagation(mode string) string {
32 32
 }
33 33
 
34 34
 // HasPropagation checks if there is a valid propagation mode present in
35
-// passed string. Returns true if a valid propagatio mode specifier is
35
+// passed string. Returns true if a valid propagation mode specifier is
36 36
 // present, false otherwise.
37 37
 func HasPropagation(mode string) bool {
38 38
 	for _, o := range strings.Split(mode, ",") {
... ...
@@ -15,7 +15,7 @@ func GetPropagation(mode string) string {
15 15
 }
16 16
 
17 17
 // HasPropagation checks if there is a valid propagation mode present in
18
-// passed string. Returns true if a valid propagatio mode specifier is
18
+// passed string. Returns true if a valid propagation mode specifier is
19 19
 // present, false otherwise.
20 20
 func HasPropagation(mode string) bool {
21 21
 	return false
... ...
@@ -161,7 +161,7 @@ func ValidMountMode(mode string) bool {
161 161
 
162 162
 // ReadWrite tells you if a mode string is a valid read-write mode or not.
163 163
 // If there are no specifications w.r.t read write mode, then by default
164
-// it returs true.
164
+// it returns true.
165 165
 func ReadWrite(mode string) bool {
166 166
 	if !ValidMountMode(mode) {
167 167
 		return false