From 7c3657065cc04af278a0f1cee99de8c2401ba0ef Mon Sep 17 00:00:00 2001 From: allencloud Date: Mon, 19 Dec 2016 14:45:48 +0800 Subject: [PATCH] change minor mistake of spelling Signed-off-by: allencloud --- api/server/router/swarm/backend.go | 2 +- api/swagger.yaml | 2 +- api/types/network/network.go | 2 +- api/types/seccomp.go | 2 +- api/types/types.go | 8 ++++---- cli/command/registry/logout.go | 2 +- cli/command/system/info.go | 2 +- client/errors.go | 2 +- client/node_inspect_test.go | 2 +- client/ping.go | 2 +- client/secret_inspect_test.go | 2 +- client/service_inspect_test.go | 2 +- daemon/keys_unsupported.go | 2 +- image/v1/imagev1.go | 2 +- pkg/integration/cmd/command.go | 2 +- pkg/plugingetter/getter.go | 2 +- pkg/stringutils/stringutils.go | 2 +- 17 files changed, 20 insertions(+), 20 deletions(-) diff --git a/api/server/router/swarm/backend.go b/api/server/router/swarm/backend.go index 33840f0d30..1a2b876b23 100644 --- a/api/server/router/swarm/backend.go +++ b/api/server/router/swarm/backend.go @@ -7,7 +7,7 @@ import ( "golang.org/x/net/context" ) -// Backend abstracts an swarm commands manager. +// Backend abstracts a swarm manager. type Backend interface { Init(req types.InitRequest) (string, error) Join(req types.JoinRequest) error diff --git a/api/swagger.yaml b/api/swagger.yaml index 09881f0073..bb55598e5f 100644 --- a/api/swagger.yaml +++ b/api/swagger.yaml @@ -4108,7 +4108,7 @@ paths: tags: ["Container"] get: summary: "Get an archive of a filesystem resource in a container" - description: "Get an tar archive of a resource in the filesystem of container id." + description: "Get a tar archive of a resource in the filesystem of container id." operationId: "ContainerGetArchive" produces: - "application/x-tar" diff --git a/api/types/network/network.go b/api/types/network/network.go index 832b3edb9f..07ea05035b 100644 --- a/api/types/network/network.go +++ b/api/types/network/network.go @@ -28,7 +28,7 @@ type EndpointIPAMConfig struct { LinkLocalIPs []string `json:",omitempty"` } -// PeerInfo represents one peer of a overlay network +// PeerInfo represents one peer of an overlay network type PeerInfo struct { Name string IP string diff --git a/api/types/seccomp.go b/api/types/seccomp.go index 4f02ef36b8..7d62c9a43f 100644 --- a/api/types/seccomp.go +++ b/api/types/seccomp.go @@ -10,7 +10,7 @@ type Seccomp struct { Syscalls []*Syscall `json:"syscalls"` } -// Architecture is used to represent an specific architecture +// Architecture is used to represent a specific architecture // and its sub-architectures type Architecture struct { Arch Arch `json:"architecture"` diff --git a/api/types/types.go b/api/types/types.go index a82c3e88ef..47ec86ceeb 100644 --- a/api/types/types.go +++ b/api/types/types.go @@ -154,11 +154,11 @@ type Version struct { BuildTime string `json:",omitempty"` } -// Commit records a external tool actual commit id version along the -// one expect by dockerd as set at build time +// Commit holds the Git-commit (SHA1) that a binary was built from, as reported +// in the version-string of external tools, such as containerd, or runC. type Commit struct { - ID string - Expected string + ID string // ID is the actual commit ID of external tool. + Expected string // Expected is the commit ID of external tool expected by dockerd as set at build time. } // Info contains response of Engine API: diff --git a/cli/command/registry/logout.go b/cli/command/registry/logout.go index 877e60e8cc..f1f397fa08 100644 --- a/cli/command/registry/logout.go +++ b/cli/command/registry/logout.go @@ -11,7 +11,7 @@ import ( "github.com/spf13/cobra" ) -// NewLogoutCommand creates a new `docker login` command +// NewLogoutCommand creates a new `docker logout` command func NewLogoutCommand(dockerCli *command.DockerCli) *cobra.Command { cmd := &cobra.Command{ Use: "logout [SERVER]", diff --git a/cli/command/system/info.go b/cli/command/system/info.go index e0b8767377..973ee18241 100644 --- a/cli/command/system/info.go +++ b/cli/command/system/info.go @@ -277,7 +277,7 @@ func prettyPrintInfo(dockerCli *command.DockerCli, info types.Info) error { for _, label := range info.Labels { stringSlice := strings.SplitN(label, "=", 2) if len(stringSlice) > 1 { - // If there is a conflict we will throw out an warning + // If there is a conflict we will throw out a warning if v, ok := labelMap[stringSlice[0]]; ok && v != stringSlice[1] { fmt.Fprintln(dockerCli.Err(), "WARNING: labels with duplicate keys and conflicting values have been deprecated") break diff --git a/client/errors.go b/client/errors.go index bf6923f134..2912692ec1 100644 --- a/client/errors.go +++ b/client/errors.go @@ -244,7 +244,7 @@ func (e secretNotFoundError) Error() string { return fmt.Sprintf("Error: no such secret: %s", e.name) } -// NoFound indicates that this error type is of NotFound +// NotFound indicates that this error type is of NotFound func (e secretNotFoundError) NotFound() bool { return true } diff --git a/client/node_inspect_test.go b/client/node_inspect_test.go index fc13283084..dca16a8cdc 100644 --- a/client/node_inspect_test.go +++ b/client/node_inspect_test.go @@ -31,7 +31,7 @@ func TestNodeInspectNodeNotFound(t *testing.T) { _, _, err := client.NodeInspectWithRaw(context.Background(), "unknown") if err == nil || !IsErrNodeNotFound(err) { - t.Fatalf("expected an nodeNotFoundError error, got %v", err) + t.Fatalf("expected a nodeNotFoundError error, got %v", err) } } diff --git a/client/ping.go b/client/ping.go index 22dcda24fd..150b1dc8d8 100644 --- a/client/ping.go +++ b/client/ping.go @@ -7,7 +7,7 @@ import ( "golang.org/x/net/context" ) -// Ping pings the server and return the value of the "Docker-Experimental" & "API-Version" headers +// Ping pings the server and returns the value of the "Docker-Experimental" & "API-Version" headers func (cli *Client) Ping(ctx context.Context) (types.Ping, error) { var ping types.Ping req, err := cli.buildRequest("GET", fmt.Sprintf("%s/_ping", cli.basePath), nil, nil) diff --git a/client/secret_inspect_test.go b/client/secret_inspect_test.go index 423d986968..0142a3ca9f 100644 --- a/client/secret_inspect_test.go +++ b/client/secret_inspect_test.go @@ -31,7 +31,7 @@ func TestSecretInspectSecretNotFound(t *testing.T) { _, _, err := client.SecretInspectWithRaw(context.Background(), "unknown") if err == nil || !IsErrSecretNotFound(err) { - t.Fatalf("expected an secretNotFoundError error, got %v", err) + t.Fatalf("expected a secretNotFoundError error, got %v", err) } } diff --git a/client/service_inspect_test.go b/client/service_inspect_test.go index e235cf0fef..0346847317 100644 --- a/client/service_inspect_test.go +++ b/client/service_inspect_test.go @@ -31,7 +31,7 @@ func TestServiceInspectServiceNotFound(t *testing.T) { _, _, err := client.ServiceInspectWithRaw(context.Background(), "unknown") if err == nil || !IsErrServiceNotFound(err) { - t.Fatalf("expected an serviceNotFoundError error, got %v", err) + t.Fatalf("expected a serviceNotFoundError error, got %v", err) } } diff --git a/daemon/keys_unsupported.go b/daemon/keys_unsupported.go index b17255940a..e49baf9454 100644 --- a/daemon/keys_unsupported.go +++ b/daemon/keys_unsupported.go @@ -2,7 +2,7 @@ package daemon -// ModifyRootKeyLimit is an noop on unsupported platforms. +// ModifyRootKeyLimit is a noop on unsupported platforms. func ModifyRootKeyLimit() error { return nil } diff --git a/image/v1/imagev1.go b/image/v1/imagev1.go index d498ddbc00..9c167a2ce9 100644 --- a/image/v1/imagev1.go +++ b/image/v1/imagev1.go @@ -109,7 +109,7 @@ func MakeConfigFromV1Config(imageJSON []byte, rootfs *image.RootFS, history []im return json.Marshal(c) } -// MakeV1ConfigFromConfig creates an legacy V1 image config from an Image struct +// MakeV1ConfigFromConfig creates a legacy V1 image config from an Image struct func MakeV1ConfigFromConfig(img *image.Image, v1ID, parentV1ID string, throwaway bool) ([]byte, error) { // Top-level v1compatibility string should be a modified version of the // image config. diff --git a/pkg/integration/cmd/command.go b/pkg/integration/cmd/command.go index 76d04e8df5..2a886ab54c 100644 --- a/pkg/integration/cmd/command.go +++ b/pkg/integration/cmd/command.go @@ -64,7 +64,7 @@ func (r *Result) Assert(t testingT, exp Expected) { t.Fatalf("at %s:%d\n%s", filepath.Base(file), line, err.Error()) } -// Compare returns an formatted error with the command, stdout, stderr, exit +// Compare returns a formatted error with the command, stdout, stderr, exit // code, and any failed expectations func (r *Result) Compare(exp Expected) error { errors := []string{} diff --git a/pkg/plugingetter/getter.go b/pkg/plugingetter/getter.go index b8096b96b2..46d4e38266 100644 --- a/pkg/plugingetter/getter.go +++ b/pkg/plugingetter/getter.go @@ -11,7 +11,7 @@ const ( RELEASE = -1 ) -// CompatPlugin is a abstraction to handle both v2(new) and v1(legacy) plugins. +// CompatPlugin is an abstraction to handle both v2(new) and v1(legacy) plugins. type CompatPlugin interface { Client() *plugins.Client Name() string diff --git a/pkg/stringutils/stringutils.go b/pkg/stringutils/stringutils.go index 8e1c812d7a..e17951bfc8 100644 --- a/pkg/stringutils/stringutils.go +++ b/pkg/stringutils/stringutils.go @@ -77,7 +77,7 @@ func quote(word string, buf *bytes.Buffer) { for i := 0; i < len(word); i++ { b := word[i] if b == '\'' { - // Replace literal ' with a close ', a \', and a open ' + // Replace literal ' with a close ', a \', and an open ' buf.WriteString("'\\''") } else { buf.WriteByte(b)