Bläddra i källkod

Merge pull request #26589 from allencloud/correct-nits

correct some nits in comments and test
Aaron Lehmann 8 år sedan
förälder
incheckning
2a87856599

+ 1 - 1
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) {
 func ParseLine(line string, d *Directive) (string, *Node, error) {
 	// Handle the parser directive '# escape=<char>. Parser directives must precede
 	// Handle the parser directive '# escape=<char>. Parser directives must precede
 	// any builder instruction or other comments, and cannot be repeated.
 	// any builder instruction or other comments, and cannot be repeated.

+ 1 - 1
client/events_test.go

@@ -38,7 +38,7 @@ func TestEventsErrorInOptions(t *testing.T) {
 		}
 		}
 		_, err := client.Events(context.Background(), e.options)
 		_, err := client.Events(context.Background(), e.options)
 		if err == nil || !strings.Contains(err.Error(), e.expectedError) {
 		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)
 		}
 		}
 	}
 	}
 }
 }

+ 2 - 2
container/container.go

@@ -960,7 +960,7 @@ type attachContext struct {
 	mu     sync.Mutex
 	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.
 // track container liveness.
 func (container *Container) InitAttachContext() context.Context {
 func (container *Container) InitAttachContext() context.Context {
 	container.attachContext.mu.Lock()
 	container.attachContext.mu.Lock()
@@ -971,7 +971,7 @@ func (container *Container) InitAttachContext() context.Context {
 	return container.attachContext.ctx
 	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.
 // after this call.
 func (container *Container) CancelAttachContext() {
 func (container *Container) CancelAttachContext() {
 	container.attachContext.mu.Lock()
 	container.attachContext.mu.Lock()

+ 1 - 1
container/container_windows.go

@@ -37,7 +37,7 @@ func (container *Container) CreateDaemonEnvironment(linkedEnv []string) []string
 	return utils.ReplaceOrAppendEnvValues(linkedEnv, container.Config.Env)
 	return utils.ReplaceOrAppendEnvValues(linkedEnv, container.Config.Env)
 }
 }
 
 
-// UnmountIpcMounts unmount Ipc related mounts.
+// UnmountIpcMounts unmounts Ipc related mounts.
 // This is a NOOP on windows.
 // This is a NOOP on windows.
 func (container *Container) UnmountIpcMounts(unmount func(pth string) error) {
 func (container *Container) UnmountIpcMounts(unmount func(pth string) error) {
 }
 }

+ 1 - 1
daemon/graphdriver/overlay2/overlay.go

@@ -92,7 +92,7 @@ func init() {
 
 
 // Init returns the a native diff driver for overlay filesystem.
 // 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 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) {
 func Init(home string, options []string, uidMaps, gidMaps []idtools.IDMap) (graphdriver.Driver, error) {
 	opts, err := parseOptions(options)
 	opts, err := parseOptions(options)
 	if err != nil {
 	if err != nil {

+ 1 - 1
plugin/store/interface.go

@@ -2,7 +2,7 @@ package store
 
 
 import "github.com/docker/docker/pkg/plugins"
 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 {
 type CompatPlugin interface {
 	Client() *plugins.Client
 	Client() *plugins.Client
 	Name() string
 	Name() string