Browse code

change minor mistake of spelling

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

allencloud authored on 2016/12/19 15:45:48
Showing 17 changed files
... ...
@@ -7,7 +7,7 @@ import (
7 7
 	"golang.org/x/net/context"
8 8
 )
9 9
 
10
-// Backend abstracts an swarm commands manager.
10
+// Backend abstracts a swarm manager.
11 11
 type Backend interface {
12 12
 	Init(req types.InitRequest) (string, error)
13 13
 	Join(req types.JoinRequest) error
... ...
@@ -4108,7 +4108,7 @@ paths:
4108 4108
       tags: ["Container"]
4109 4109
     get:
4110 4110
       summary: "Get an archive of a filesystem resource in a container"
4111
-      description: "Get an tar archive of a resource in the filesystem of container id."
4111
+      description: "Get a tar archive of a resource in the filesystem of container id."
4112 4112
       operationId: "ContainerGetArchive"
4113 4113
       produces:
4114 4114
         - "application/x-tar"
... ...
@@ -28,7 +28,7 @@ type EndpointIPAMConfig struct {
28 28
 	LinkLocalIPs []string `json:",omitempty"`
29 29
 }
30 30
 
31
-// PeerInfo represents one peer of a overlay network
31
+// PeerInfo represents one peer of an overlay network
32 32
 type PeerInfo struct {
33 33
 	Name string
34 34
 	IP   string
... ...
@@ -10,7 +10,7 @@ type Seccomp struct {
10 10
 	Syscalls      []*Syscall     `json:"syscalls"`
11 11
 }
12 12
 
13
-// Architecture is used to represent an specific architecture
13
+// Architecture is used to represent a specific architecture
14 14
 // and its sub-architectures
15 15
 type Architecture struct {
16 16
 	Arch      Arch   `json:"architecture"`
... ...
@@ -154,11 +154,11 @@ type Version struct {
154 154
 	BuildTime     string `json:",omitempty"`
155 155
 }
156 156
 
157
-// Commit records a external tool actual commit id version along the
158
-// one expect by dockerd as set at build time
157
+// Commit holds the Git-commit (SHA1) that a binary was built from, as reported
158
+// in the version-string of external tools, such as containerd, or runC.
159 159
 type Commit struct {
160
-	ID       string
161
-	Expected string
160
+	ID       string // ID is the actual commit ID of external tool.
161
+	Expected string // Expected is the commit ID of external tool expected by dockerd as set at build time.
162 162
 }
163 163
 
164 164
 // Info contains response of Engine API:
... ...
@@ -11,7 +11,7 @@ import (
11 11
 	"github.com/spf13/cobra"
12 12
 )
13 13
 
14
-// NewLogoutCommand creates a new `docker login` command
14
+// NewLogoutCommand creates a new `docker logout` command
15 15
 func NewLogoutCommand(dockerCli *command.DockerCli) *cobra.Command {
16 16
 	cmd := &cobra.Command{
17 17
 		Use:   "logout [SERVER]",
... ...
@@ -277,7 +277,7 @@ func prettyPrintInfo(dockerCli *command.DockerCli, info types.Info) error {
277 277
 		for _, label := range info.Labels {
278 278
 			stringSlice := strings.SplitN(label, "=", 2)
279 279
 			if len(stringSlice) > 1 {
280
-				// If there is a conflict we will throw out an warning
280
+				// If there is a conflict we will throw out a warning
281 281
 				if v, ok := labelMap[stringSlice[0]]; ok && v != stringSlice[1] {
282 282
 					fmt.Fprintln(dockerCli.Err(), "WARNING: labels with duplicate keys and conflicting values have been deprecated")
283 283
 					break
... ...
@@ -244,7 +244,7 @@ func (e secretNotFoundError) Error() string {
244 244
 	return fmt.Sprintf("Error: no such secret: %s", e.name)
245 245
 }
246 246
 
247
-// NoFound indicates that this error type is of NotFound
247
+// NotFound indicates that this error type is of NotFound
248 248
 func (e secretNotFoundError) NotFound() bool {
249 249
 	return true
250 250
 }
... ...
@@ -31,7 +31,7 @@ func TestNodeInspectNodeNotFound(t *testing.T) {
31 31
 
32 32
 	_, _, err := client.NodeInspectWithRaw(context.Background(), "unknown")
33 33
 	if err == nil || !IsErrNodeNotFound(err) {
34
-		t.Fatalf("expected an nodeNotFoundError error, got %v", err)
34
+		t.Fatalf("expected a nodeNotFoundError error, got %v", err)
35 35
 	}
36 36
 }
37 37
 
... ...
@@ -7,7 +7,7 @@ import (
7 7
 	"golang.org/x/net/context"
8 8
 )
9 9
 
10
-// Ping pings the server and return the value of the "Docker-Experimental" & "API-Version" headers
10
+// Ping pings the server and returns the value of the "Docker-Experimental" & "API-Version" headers
11 11
 func (cli *Client) Ping(ctx context.Context) (types.Ping, error) {
12 12
 	var ping types.Ping
13 13
 	req, err := cli.buildRequest("GET", fmt.Sprintf("%s/_ping", cli.basePath), nil, nil)
... ...
@@ -31,7 +31,7 @@ func TestSecretInspectSecretNotFound(t *testing.T) {
31 31
 
32 32
 	_, _, err := client.SecretInspectWithRaw(context.Background(), "unknown")
33 33
 	if err == nil || !IsErrSecretNotFound(err) {
34
-		t.Fatalf("expected an secretNotFoundError error, got %v", err)
34
+		t.Fatalf("expected a secretNotFoundError error, got %v", err)
35 35
 	}
36 36
 }
37 37
 
... ...
@@ -31,7 +31,7 @@ func TestServiceInspectServiceNotFound(t *testing.T) {
31 31
 
32 32
 	_, _, err := client.ServiceInspectWithRaw(context.Background(), "unknown")
33 33
 	if err == nil || !IsErrServiceNotFound(err) {
34
-		t.Fatalf("expected an serviceNotFoundError error, got %v", err)
34
+		t.Fatalf("expected a serviceNotFoundError error, got %v", err)
35 35
 	}
36 36
 }
37 37
 
... ...
@@ -2,7 +2,7 @@
2 2
 
3 3
 package daemon
4 4
 
5
-// ModifyRootKeyLimit is an noop on unsupported platforms.
5
+// ModifyRootKeyLimit is a noop on unsupported platforms.
6 6
 func ModifyRootKeyLimit() error {
7 7
 	return nil
8 8
 }
... ...
@@ -109,7 +109,7 @@ func MakeConfigFromV1Config(imageJSON []byte, rootfs *image.RootFS, history []im
109 109
 	return json.Marshal(c)
110 110
 }
111 111
 
112
-// MakeV1ConfigFromConfig creates an legacy V1 image config from an Image struct
112
+// MakeV1ConfigFromConfig creates a legacy V1 image config from an Image struct
113 113
 func MakeV1ConfigFromConfig(img *image.Image, v1ID, parentV1ID string, throwaway bool) ([]byte, error) {
114 114
 	// Top-level v1compatibility string should be a modified version of the
115 115
 	// image config.
... ...
@@ -64,7 +64,7 @@ func (r *Result) Assert(t testingT, exp Expected) {
64 64
 	t.Fatalf("at %s:%d\n%s", filepath.Base(file), line, err.Error())
65 65
 }
66 66
 
67
-// Compare returns an formatted error with the command, stdout, stderr, exit
67
+// Compare returns a formatted error with the command, stdout, stderr, exit
68 68
 // code, and any failed expectations
69 69
 func (r *Result) Compare(exp Expected) error {
70 70
 	errors := []string{}
... ...
@@ -11,7 +11,7 @@ const (
11 11
 	RELEASE = -1
12 12
 )
13 13
 
14
-// CompatPlugin is a abstraction to handle both v2(new) and v1(legacy) plugins.
14
+// CompatPlugin is an abstraction to handle both v2(new) and v1(legacy) plugins.
15 15
 type CompatPlugin interface {
16 16
 	Client() *plugins.Client
17 17
 	Name() string
... ...
@@ -77,7 +77,7 @@ func quote(word string, buf *bytes.Buffer) {
77 77
 	for i := 0; i < len(word); i++ {
78 78
 		b := word[i]
79 79
 		if b == '\'' {
80
-			// Replace literal ' with a close ', a \', and a open '
80
+			// Replace literal ' with a close ', a \', and an open '
81 81
 			buf.WriteString("'\\''")
82 82
 		} else {
83 83
 			buf.WriteByte(b)