浏览代码

change minor mistake of spelling

Signed-off-by: allencloud <allen.sun@daocloud.io>
allencloud 8 年之前
父节点
当前提交
7c3657065c

+ 1 - 1
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

+ 1 - 1
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"

+ 1 - 1
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

+ 1 - 1
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"`

+ 4 - 4
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:

+ 1 - 1
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]",

+ 1 - 1
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

+ 1 - 1
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
 }

+ 1 - 1
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)
 	}
 }
 

+ 1 - 1
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)

+ 1 - 1
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)
 	}
 }
 

+ 1 - 1
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)
 	}
 }
 

+ 1 - 1
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
 }

+ 1 - 1
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.

+ 1 - 1
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{}

+ 1 - 1
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

+ 1 - 1
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)