1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

fix typos

Signed-off-by: allencloud <allen.sun@daocloud.io>
This commit is contained in:
allencloud 2016-03-06 00:59:11 +08:00
parent 160abfbeea
commit 2736f77a94
5 changed files with 7 additions and 7 deletions

View file

@ -310,7 +310,7 @@ func TestLoadOrCreateTrustKeyCreateKey(t *testing.T) {
} }
// With the need to create the folder hierarchy as tmpKeyFie is in a path // 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") tmpKeyFile = filepath.Join(tmpKeyFolderPath, "folder/hierarchy/keyfile")
if key, err := LoadOrCreateTrustKey(tmpKeyFile); err != nil || key == nil { if key, err := LoadOrCreateTrustKey(tmpKeyFile); err != nil || key == nil {

View file

@ -17,7 +17,7 @@ import (
const APIVersionKey = "api-version" const APIVersionKey = "api-version"
// APIFunc is an adapter to allow the use of ordinary functions as Docker API endpoints. // 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 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 // HijackConnection interrupts the http response writer to get the
@ -75,7 +75,7 @@ func ParseForm(r *http.Request) error {
return nil 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 { func ParseMultipartForm(r *http.Request) error {
if err := r.ParseMultipartForm(4096); err != nil && !strings.HasPrefix(err.Error(), "mime:") { if err := r.ParseMultipartForm(4096); err != nil && !strings.HasPrefix(err.Error(), "mime:") {
return err return err

View file

@ -3,5 +3,5 @@ package middleware
import "github.com/docker/docker/api/server/httputils" import "github.com/docker/docker/api/server/httputils"
// Middleware is an adapter to allow the use of ordinary functions as Docker API filters. // 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 type Middleware func(handler httputils.APIFunc) httputils.APIFunc

View file

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

View file

@ -7,7 +7,7 @@ import (
"github.com/gorilla/mux" "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. // mux routers.
type routerSwapper struct { type routerSwapper struct {
mu sync.Mutex mu sync.Mutex