Browse code

fix typos

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

allencloud authored on 2016/03/06 01:59:11
Showing 5 changed files
... ...
@@ -310,7 +310,7 @@ func TestLoadOrCreateTrustKeyCreateKey(t *testing.T) {
310 310
 	}
311 311
 
312 312
 	// With the need to create the folder hierarchy as tmpKeyFie is in a path
313
-	// where some folder do not exists.
313
+	// where some folders do not exist.
314 314
 	tmpKeyFile = filepath.Join(tmpKeyFolderPath, "folder/hierarchy/keyfile")
315 315
 
316 316
 	if key, err := LoadOrCreateTrustKey(tmpKeyFile); err != nil || key == nil {
... ...
@@ -17,7 +17,7 @@ import (
17 17
 const APIVersionKey = "api-version"
18 18
 
19 19
 // APIFunc is an adapter to allow the use of ordinary functions as Docker API endpoints.
20
-// Any function that has the appropriate signature can be register as a API endpoint (e.g. getVersion).
20
+// Any function that has the appropriate signature can be registered as a API endpoint (e.g. getVersion).
21 21
 type APIFunc func(ctx context.Context, w http.ResponseWriter, r *http.Request, vars map[string]string) error
22 22
 
23 23
 // HijackConnection interrupts the http response writer to get the
... ...
@@ -75,7 +75,7 @@ func ParseForm(r *http.Request) error {
75 75
 	return nil
76 76
 }
77 77
 
78
-// ParseMultipartForm ensure the request form is parsed, even with invalid content types.
78
+// ParseMultipartForm ensures the request form is parsed, even with invalid content types.
79 79
 func ParseMultipartForm(r *http.Request) error {
80 80
 	if err := r.ParseMultipartForm(4096); err != nil && !strings.HasPrefix(err.Error(), "mime:") {
81 81
 		return err
... ...
@@ -3,5 +3,5 @@ package middleware
3 3
 import "github.com/docker/docker/api/server/httputils"
4 4
 
5 5
 // Middleware is an adapter to allow the use of ordinary functions as Docker API filters.
6
-// Any function that has the appropriate signature can be register as a middleware.
6
+// Any function that has the appropriate signature can be registered as a middleware.
7 7
 type Middleware func(handler httputils.APIFunc) httputils.APIFunc
... ...
@@ -84,8 +84,8 @@ func filterNetworkByID(nws []libnetwork.Network, id string) (retNws []libnetwork
84 84
 	return retNws, nil
85 85
 }
86 86
 
87
-// filterAllNetworks filter network list according to user specified filter
88
-// and return user chosen networks
87
+// filterAllNetworks filters network list according to user specified filter
88
+// and returns user chosen networks
89 89
 func filterNetworks(nws []libnetwork.Network, filter filters.Args) ([]libnetwork.Network, error) {
90 90
 	// if filter is empty, return original network list
91 91
 	if filter.Len() == 0 {
... ...
@@ -7,7 +7,7 @@ import (
7 7
 	"github.com/gorilla/mux"
8 8
 )
9 9
 
10
-// routerSwapper is an http.Handler that allow you to swap
10
+// routerSwapper is an http.Handler that allows you to swap
11 11
 // mux routers.
12 12
 type routerSwapper struct {
13 13
 	mu     sync.Mutex