瀏覽代碼

fix typos

Signed-off-by: allencloud <allen.sun@daocloud.io>
allencloud 9 年之前
父節點
當前提交
2736f77a94

+ 1 - 1
api/common_test.go

@@ -310,7 +310,7 @@ func TestLoadOrCreateTrustKeyCreateKey(t *testing.T) {
 	}
 
 	// With the need to create the folder hierarchy as tmpKeyFie is in a path
-	// where some folder do not exists.
+	// where some folders do not exist.
 	tmpKeyFile = filepath.Join(tmpKeyFolderPath, "folder/hierarchy/keyfile")
 
 	if key, err := LoadOrCreateTrustKey(tmpKeyFile); err != nil || key == nil {

+ 2 - 2
api/server/httputils/httputils.go

@@ -17,7 +17,7 @@ import (
 const APIVersionKey = "api-version"
 
 // APIFunc is an adapter to allow the use of ordinary functions as Docker API endpoints.
-// Any function that has the appropriate signature can be register as a API endpoint (e.g. getVersion).
+// Any function that has the appropriate signature can be registered as a API endpoint (e.g. getVersion).
 type APIFunc func(ctx context.Context, w http.ResponseWriter, r *http.Request, vars map[string]string) error
 
 // HijackConnection interrupts the http response writer to get the
@@ -75,7 +75,7 @@ func ParseForm(r *http.Request) error {
 	return nil
 }
 
-// ParseMultipartForm ensure the request form is parsed, even with invalid content types.
+// ParseMultipartForm ensures the request form is parsed, even with invalid content types.
 func ParseMultipartForm(r *http.Request) error {
 	if err := r.ParseMultipartForm(4096); err != nil && !strings.HasPrefix(err.Error(), "mime:") {
 		return err

+ 1 - 1
api/server/middleware/middleware.go

@@ -3,5 +3,5 @@ package middleware
 import "github.com/docker/docker/api/server/httputils"
 
 // Middleware is an adapter to allow the use of ordinary functions as Docker API filters.
-// Any function that has the appropriate signature can be register as a middleware.
+// Any function that has the appropriate signature can be registered as a middleware.
 type Middleware func(handler httputils.APIFunc) httputils.APIFunc

+ 2 - 2
api/server/router/network/filter.go

@@ -84,8 +84,8 @@ func filterNetworkByID(nws []libnetwork.Network, id string) (retNws []libnetwork
 	return retNws, nil
 }
 
-// filterAllNetworks filter network list according to user specified filter
-// and return user chosen networks
+// filterAllNetworks filters network list according to user specified filter
+// and returns user chosen networks
 func filterNetworks(nws []libnetwork.Network, filter filters.Args) ([]libnetwork.Network, error) {
 	// if filter is empty, return original network list
 	if filter.Len() == 0 {

+ 1 - 1
api/server/router_swapper.go

@@ -7,7 +7,7 @@ import (
 	"github.com/gorilla/mux"
 )
 
-// routerSwapper is an http.Handler that allow you to swap
+// routerSwapper is an http.Handler that allows you to swap
 // mux routers.
 type routerSwapper struct {
 	mu     sync.Mutex