diff --git a/api/common_test.go b/api/common_test.go index 4f36b45471..c214660cc4 100644 --- a/api/common_test.go +++ b/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 { diff --git a/api/server/httputils/httputils.go b/api/server/httputils/httputils.go index 787a4d3181..c81256b145 100644 --- a/api/server/httputils/httputils.go +++ b/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 diff --git a/api/server/middleware/middleware.go b/api/server/middleware/middleware.go index b4b28ec52c..588331ae7e 100644 --- a/api/server/middleware/middleware.go +++ b/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 diff --git a/api/server/router/network/filter.go b/api/server/router/network/filter.go index 31d8d0c521..f1648cc2ae 100644 --- a/api/server/router/network/filter.go +++ b/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 { diff --git a/api/server/router_swapper.go b/api/server/router_swapper.go index b5f1d06d8d..1ecc7a7f39 100644 --- a/api/server/router_swapper.go +++ b/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