Skip to content

Commit c9b2a3c

Browse files
committed
api: normalize comment formatting
Signed-off-by: Sebastiaan van Stijn <[email protected]>
1 parent 580d367 commit c9b2a3c

8 files changed

Lines changed: 11 additions & 11 deletions

File tree

api/server/router/container/container_routes.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ func (s *containerRouter) postCommit(ctx context.Context, w http.ResponseWriter,
4141
}
4242

4343
config, _, _, err := s.decoder.DecodeConfig(r.Body)
44-
if err != nil && err != io.EOF { //Do not fail if body is empty.
44+
if err != nil && err != io.EOF { // Do not fail if body is empty.
4545
return err
4646
}
4747

api/server/router/image/image_routes.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ func (s *imageRouter) postImagesCreate(ctx context.Context, w http.ResponseWrite
5757
}
5858
}
5959

60-
if image != "" { //pull
60+
if image != "" { // pull
6161
metaHeaders := map[string][]string{}
6262
for k, v := range r.Header {
6363
if strings.HasPrefix(k, "X-Meta-") {
@@ -76,7 +76,7 @@ func (s *imageRouter) postImagesCreate(ctx context.Context, w http.ResponseWrite
7676
}
7777
}
7878
err = s.backend.PullImage(ctx, image, tag, platform, metaHeaders, authConfig, output)
79-
} else { //import
79+
} else { // import
8080
src := r.Form.Get("fromSrc")
8181
// 'err' MUST NOT be defined within this block, we need any error
8282
// generated from the download to be available to the output

api/server/router/plugin/plugin_routes.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ func (pr *pluginRouter) createPlugin(ctx context.Context, w http.ResponseWriter,
211211
if err := pr.backend.CreateFromContext(ctx, r.Body, options); err != nil {
212212
return err
213213
}
214-
//TODO: send progress bar
214+
// TODO: send progress bar
215215
w.WriteHeader(http.StatusNoContent)
216216
return nil
217217
}

api/types/backend/backend.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ type ContainerAttachConfig struct {
3030
// expectation is for the logger endpoints to assemble the chunks using this
3131
// metadata.
3232
type PartialLogMetaData struct {
33-
Last bool //true if this message is last of a partial
33+
Last bool // true if this message is last of a partial
3434
ID string // identifies group of messages comprising a single record
3535
Ordinal int // ordering of message in partial group
3636
}

api/types/client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,7 @@ type ImagePullOptions struct {
265265
// if the privilege request fails.
266266
type RequestPrivilegeFunc func() (string, error)
267267

268-
//ImagePushOptions holds information to push images.
268+
// ImagePushOptions holds information to push images.
269269
type ImagePushOptions ImagePullOptions
270270

271271
// ImageRemoveOptions holds parameters to remove images.

api/types/container/host_config.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ func (n NetworkMode) ConnectedContainer() string {
145145
return ""
146146
}
147147

148-
//UserDefined indicates user-created network
148+
// UserDefined indicates user-created network
149149
func (n NetworkMode) UserDefined() string {
150150
if n.IsUserDefined() {
151151
return string(n)

api/types/filters/parse.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ func (args Args) Len() int {
154154
func (args Args) MatchKVList(key string, sources map[string]string) bool {
155155
fieldValues := args.fields[key]
156156

157-
//do not filter if there is no filter set or cannot determine filter
157+
// do not filter if there is no filter set or cannot determine filter
158158
if len(fieldValues) == 0 {
159159
return true
160160
}
@@ -200,7 +200,7 @@ func (args Args) Match(field, source string) bool {
200200
// ExactMatch returns true if the source matches exactly one of the values.
201201
func (args Args) ExactMatch(key, source string) bool {
202202
fieldValues, ok := args.fields[key]
203-
//do not filter if there is no filter set or cannot determine filter
203+
// do not filter if there is no filter set or cannot determine filter
204204
if !ok || len(fieldValues) == 0 {
205205
return true
206206
}
@@ -213,7 +213,7 @@ func (args Args) ExactMatch(key, source string) bool {
213213
// matches exactly the value.
214214
func (args Args) UniqueExactMatch(key, source string) bool {
215215
fieldValues := args.fields[key]
216-
//do not filter if there is no filter set or cannot determine filter
216+
// do not filter if there is no filter set or cannot determine filter
217217
if len(fieldValues) == 0 {
218218
return true
219219
}

api/types/network/network.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ type Address struct {
1313
// IPAM represents IP Address Management
1414
type IPAM struct {
1515
Driver string
16-
Options map[string]string //Per network IPAM driver options
16+
Options map[string]string // Per network IPAM driver options
1717
Config []IPAMConfig
1818
}
1919

0 commit comments

Comments
 (0)