diff --git a/api/server/router/container/container_routes.go b/api/server/router/container/container_routes.go index ed377d9c61..b41e540ad0 100644 --- a/api/server/router/container/container_routes.go +++ b/api/server/router/container/container_routes.go @@ -41,7 +41,7 @@ func (s *containerRouter) postCommit(ctx context.Context, w http.ResponseWriter, } config, _, _, err := s.decoder.DecodeConfig(r.Body) - if err != nil && err != io.EOF { //Do not fail if body is empty. + if err != nil && err != io.EOF { // Do not fail if body is empty. return err } diff --git a/api/server/router/image/image_routes.go b/api/server/router/image/image_routes.go index 1f7d81adfa..618d46fb77 100644 --- a/api/server/router/image/image_routes.go +++ b/api/server/router/image/image_routes.go @@ -57,7 +57,7 @@ func (s *imageRouter) postImagesCreate(ctx context.Context, w http.ResponseWrite } } - if image != "" { //pull + if image != "" { // pull metaHeaders := map[string][]string{} for k, v := range r.Header { if strings.HasPrefix(k, "X-Meta-") { @@ -76,7 +76,7 @@ func (s *imageRouter) postImagesCreate(ctx context.Context, w http.ResponseWrite } } err = s.backend.PullImage(ctx, image, tag, platform, metaHeaders, authConfig, output) - } else { //import + } else { // import src := r.Form.Get("fromSrc") // 'err' MUST NOT be defined within this block, we need any error // generated from the download to be available to the output diff --git a/api/server/router/plugin/plugin_routes.go b/api/server/router/plugin/plugin_routes.go index 31b2c30215..8c36b51ecc 100644 --- a/api/server/router/plugin/plugin_routes.go +++ b/api/server/router/plugin/plugin_routes.go @@ -211,7 +211,7 @@ func (pr *pluginRouter) createPlugin(ctx context.Context, w http.ResponseWriter, if err := pr.backend.CreateFromContext(ctx, r.Body, options); err != nil { return err } - //TODO: send progress bar + // TODO: send progress bar w.WriteHeader(http.StatusNoContent) return nil } diff --git a/api/types/backend/backend.go b/api/types/backend/backend.go index ef1e669c39..6afdd16dfc 100644 --- a/api/types/backend/backend.go +++ b/api/types/backend/backend.go @@ -30,7 +30,7 @@ type ContainerAttachConfig struct { // expectation is for the logger endpoints to assemble the chunks using this // metadata. type PartialLogMetaData struct { - Last bool //true if this message is last of a partial + Last bool // true if this message is last of a partial ID string // identifies group of messages comprising a single record Ordinal int // ordering of message in partial group } diff --git a/api/types/client.go b/api/types/client.go index 8363ed736e..54cb236efe 100644 --- a/api/types/client.go +++ b/api/types/client.go @@ -265,7 +265,7 @@ type ImagePullOptions struct { // if the privilege request fails. type RequestPrivilegeFunc func() (string, error) -//ImagePushOptions holds information to push images. +// ImagePushOptions holds information to push images. type ImagePushOptions ImagePullOptions // ImageRemoveOptions holds parameters to remove images. diff --git a/api/types/container/host_config.go b/api/types/container/host_config.go index 209f33eb91..b8a4b3aa62 100644 --- a/api/types/container/host_config.go +++ b/api/types/container/host_config.go @@ -145,7 +145,7 @@ func (n NetworkMode) ConnectedContainer() string { return "" } -//UserDefined indicates user-created network +// UserDefined indicates user-created network func (n NetworkMode) UserDefined() string { if n.IsUserDefined() { return string(n) diff --git a/api/types/filters/parse.go b/api/types/filters/parse.go index cd7ad92e79..4bc91cffd6 100644 --- a/api/types/filters/parse.go +++ b/api/types/filters/parse.go @@ -154,7 +154,7 @@ func (args Args) Len() int { func (args Args) MatchKVList(key string, sources map[string]string) bool { fieldValues := args.fields[key] - //do not filter if there is no filter set or cannot determine filter + // do not filter if there is no filter set or cannot determine filter if len(fieldValues) == 0 { return true } @@ -200,7 +200,7 @@ func (args Args) Match(field, source string) bool { // ExactMatch returns true if the source matches exactly one of the values. func (args Args) ExactMatch(key, source string) bool { fieldValues, ok := args.fields[key] - //do not filter if there is no filter set or cannot determine filter + // do not filter if there is no filter set or cannot determine filter if !ok || len(fieldValues) == 0 { return true } @@ -213,7 +213,7 @@ func (args Args) ExactMatch(key, source string) bool { // matches exactly the value. func (args Args) UniqueExactMatch(key, source string) bool { fieldValues := args.fields[key] - //do not filter if there is no filter set or cannot determine filter + // do not filter if there is no filter set or cannot determine filter if len(fieldValues) == 0 { return true } diff --git a/api/types/network/network.go b/api/types/network/network.go index 71e97338fd..7927dbfffb 100644 --- a/api/types/network/network.go +++ b/api/types/network/network.go @@ -13,7 +13,7 @@ type Address struct { // IPAM represents IP Address Management type IPAM struct { Driver string - Options map[string]string //Per network IPAM driver options + Options map[string]string // Per network IPAM driver options Config []IPAMConfig }