Browse code

correct some nits in comments

Signed-off-by: allencloud <allen.sun@daocloud.io>

allencloud authored on 2016/09/04 16:17:58
Showing 6 changed files
... ...
@@ -94,7 +94,7 @@ func init() {
94 94
 	}
95 95
 }
96 96
 
97
-// ParseLine parse a line and return the remainder.
97
+// ParseLine parses a line and returns the remainder.
98 98
 func ParseLine(line string, d *Directive) (string, *Node, error) {
99 99
 	// Handle the parser directive '# escape=<char>. Parser directives must precede
100 100
 	// any builder instruction or other comments, and cannot be repeated.
... ...
@@ -38,7 +38,7 @@ func TestEventsErrorInOptions(t *testing.T) {
38 38
 		}
39 39
 		_, err := client.Events(context.Background(), e.options)
40 40
 		if err == nil || !strings.Contains(err.Error(), e.expectedError) {
41
-			t.Fatalf("expected a error %q, got %v", e.expectedError, err)
41
+			t.Fatalf("expected an error %q, got %v", e.expectedError, err)
42 42
 		}
43 43
 	}
44 44
 }
... ...
@@ -960,7 +960,7 @@ type attachContext struct {
960 960
 	mu     sync.Mutex
961 961
 }
962 962
 
963
-// InitAttachContext initialize or returns existing context for attach calls to
963
+// InitAttachContext initializes or returns existing context for attach calls to
964 964
 // track container liveness.
965 965
 func (container *Container) InitAttachContext() context.Context {
966 966
 	container.attachContext.mu.Lock()
... ...
@@ -971,7 +971,7 @@ func (container *Container) InitAttachContext() context.Context {
971 971
 	return container.attachContext.ctx
972 972
 }
973 973
 
974
-// CancelAttachContext cancel attach context. All attach calls should detach
974
+// CancelAttachContext cancels attach context. All attach calls should detach
975 975
 // after this call.
976 976
 func (container *Container) CancelAttachContext() {
977 977
 	container.attachContext.mu.Lock()
... ...
@@ -37,7 +37,7 @@ func (container *Container) CreateDaemonEnvironment(linkedEnv []string) []string
37 37
 	return utils.ReplaceOrAppendEnvValues(linkedEnv, container.Config.Env)
38 38
 }
39 39
 
40
-// UnmountIpcMounts unmount Ipc related mounts.
40
+// UnmountIpcMounts unmounts Ipc related mounts.
41 41
 // This is a NOOP on windows.
42 42
 func (container *Container) UnmountIpcMounts(unmount func(pth string) error) {
43 43
 }
... ...
@@ -92,7 +92,7 @@ func init() {
92 92
 
93 93
 // Init returns the a native diff driver for overlay filesystem.
94 94
 // If overlay filesystem is not supported on the host, graphdriver.ErrNotSupported is returned as error.
95
-// If a overlay filesystem is not supported over a existing filesystem then error graphdriver.ErrIncompatibleFS is returned.
95
+// If an overlay filesystem is not supported over an existing filesystem then error graphdriver.ErrIncompatibleFS is returned.
96 96
 func Init(home string, options []string, uidMaps, gidMaps []idtools.IDMap) (graphdriver.Driver, error) {
97 97
 	opts, err := parseOptions(options)
98 98
 	if err != nil {
... ...
@@ -2,7 +2,7 @@ package store
2 2
 
3 3
 import "github.com/docker/docker/pkg/plugins"
4 4
 
5
-// CompatPlugin is a abstraction to handle both new and legacy (v1) plugins.
5
+// CompatPlugin is an abstraction to handle both new and legacy (v1) plugins.
6 6
 type CompatPlugin interface {
7 7
 	Client() *plugins.Client
8 8
 	Name() string