From 9279a93f6d43da4c904eeb0adb249fdfa34f7f92 Mon Sep 17 00:00:00 2001 From: allencloud Date: Sun, 4 Sep 2016 15:17:58 +0800 Subject: [PATCH] correct some nits in comments Signed-off-by: allencloud --- builder/dockerfile/parser/parser.go | 2 +- client/events_test.go | 2 +- container/container.go | 4 ++-- container/container_windows.go | 2 +- daemon/graphdriver/overlay2/overlay.go | 2 +- plugin/store/interface.go | 2 +- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/builder/dockerfile/parser/parser.go b/builder/dockerfile/parser/parser.go index 6fb84d921c..b1dd8f2fdd 100644 --- a/builder/dockerfile/parser/parser.go +++ b/builder/dockerfile/parser/parser.go @@ -94,7 +94,7 @@ func init() { } } -// ParseLine parse a line and return the remainder. +// ParseLine parses a line and returns the remainder. func ParseLine(line string, d *Directive) (string, *Node, error) { // Handle the parser directive '# escape=. Parser directives must precede // any builder instruction or other comments, and cannot be repeated. diff --git a/client/events_test.go b/client/events_test.go index f7cb33f611..57689322c3 100644 --- a/client/events_test.go +++ b/client/events_test.go @@ -38,7 +38,7 @@ func TestEventsErrorInOptions(t *testing.T) { } _, err := client.Events(context.Background(), e.options) if err == nil || !strings.Contains(err.Error(), e.expectedError) { - t.Fatalf("expected a error %q, got %v", e.expectedError, err) + t.Fatalf("expected an error %q, got %v", e.expectedError, err) } } } diff --git a/container/container.go b/container/container.go index c3adc95df5..a6278f0f67 100644 --- a/container/container.go +++ b/container/container.go @@ -960,7 +960,7 @@ type attachContext struct { mu sync.Mutex } -// InitAttachContext initialize or returns existing context for attach calls to +// InitAttachContext initializes or returns existing context for attach calls to // track container liveness. func (container *Container) InitAttachContext() context.Context { container.attachContext.mu.Lock() @@ -971,7 +971,7 @@ func (container *Container) InitAttachContext() context.Context { return container.attachContext.ctx } -// CancelAttachContext cancel attach context. All attach calls should detach +// CancelAttachContext cancels attach context. All attach calls should detach // after this call. func (container *Container) CancelAttachContext() { container.attachContext.mu.Lock() diff --git a/container/container_windows.go b/container/container_windows.go index c775809fe2..0a6c7a8ff8 100644 --- a/container/container_windows.go +++ b/container/container_windows.go @@ -37,7 +37,7 @@ func (container *Container) CreateDaemonEnvironment(linkedEnv []string) []string return utils.ReplaceOrAppendEnvValues(linkedEnv, container.Config.Env) } -// UnmountIpcMounts unmount Ipc related mounts. +// UnmountIpcMounts unmounts Ipc related mounts. // This is a NOOP on windows. func (container *Container) UnmountIpcMounts(unmount func(pth string) error) { } diff --git a/daemon/graphdriver/overlay2/overlay.go b/daemon/graphdriver/overlay2/overlay.go index a348a330b9..23b3146a8e 100644 --- a/daemon/graphdriver/overlay2/overlay.go +++ b/daemon/graphdriver/overlay2/overlay.go @@ -92,7 +92,7 @@ func init() { // Init returns the a native diff driver for overlay filesystem. // If overlay filesystem is not supported on the host, graphdriver.ErrNotSupported is returned as error. -// If a overlay filesystem is not supported over a existing filesystem then error graphdriver.ErrIncompatibleFS is returned. +// If an overlay filesystem is not supported over an existing filesystem then error graphdriver.ErrIncompatibleFS is returned. func Init(home string, options []string, uidMaps, gidMaps []idtools.IDMap) (graphdriver.Driver, error) { opts, err := parseOptions(options) if err != nil { diff --git a/plugin/store/interface.go b/plugin/store/interface.go index a6f4f883a8..88277b498c 100644 --- a/plugin/store/interface.go +++ b/plugin/store/interface.go @@ -2,7 +2,7 @@ package store import "github.com/docker/docker/pkg/plugins" -// CompatPlugin is a abstraction to handle both new and legacy (v1) plugins. +// CompatPlugin is an abstraction to handle both new and legacy (v1) plugins. type CompatPlugin interface { Client() *plugins.Client Name() string