Signed-off-by: allencloud <allen.sun@daocloud.io>
This commit is contained in:
allencloud 2016-03-06 00:59:11 +08:00
Родитель 160abfbeea
Коммит 2736f77a94
5 изменённых файлов: 7 добавлений и 7 удалений

Просмотреть файл

@ -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 {

Просмотреть файл

@ -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

Просмотреть файл

@ -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

Просмотреть файл

@ -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 {

Просмотреть файл

@ -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