summaryrefslogtreecommitdiff
path: root/libnetwork/cmd
diff options
context:
space:
mode:
authorSebastiaan van Stijn <github@gone.nl>2022-07-13 22:30:47 +0200
committerSebastiaan van Stijn <github@gone.nl>2022-07-13 22:31:53 +0200
commit4f0834668696c981ef56ee77dc7af05bf3d0dbf9 (patch)
treef701e0711c6da643ddd40e1d572cba1d82be40b1 /libnetwork/cmd
parentdc4ab45e05d0b42deccfefddcaf17fdcb75e497c (diff)
downloaddocker-4f0834668696c981ef56ee77dc7af05bf3d0dbf9.tar.gz
fix formatting of "nolint" tags for go1.19
The correct formatting for machine-readable comments is; //<some alphanumeric identifier>:<options>[,<option>...][ // comment] Which basically means: - MUST NOT have a space before `<identifier>` (e.g. `nolint`) - Identified MUST be alphanumeric - MUST be followed by a colon - MUST be followed by at least one `<option>` - Optionally additional `<options>` (comma-separated) - Optionally followed by a comment Any other format will not be considered a machine-readable comment by `gofmt`, and thus formatted as a regular comment. Note that this also means that a `//nolint` (without anything after it) is considered invalid, same for `//#nosec` (starts with a `#`). Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Diffstat (limited to 'libnetwork/cmd')
-rw-r--r--libnetwork/cmd/networkdb-test/dummyclient/dummyClient.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/libnetwork/cmd/networkdb-test/dummyclient/dummyClient.go b/libnetwork/cmd/networkdb-test/dummyclient/dummyClient.go
index 20c2d41328..92498c7b25 100644
--- a/libnetwork/cmd/networkdb-test/dummyclient/dummyClient.go
+++ b/libnetwork/cmd/networkdb-test/dummyclient/dummyClient.go
@@ -29,11 +29,11 @@ type tableHandler struct {
var clientWatchTable = map[string]tableHandler{}
func watchTable(ctx interface{}, w http.ResponseWriter, r *http.Request) {
- r.ParseForm() // nolint:errcheck
+ r.ParseForm() //nolint:errcheck
diagnostic.DebugHTTPForm(r)
if len(r.Form["tname"]) < 1 {
rsp := diagnostic.WrongCommand(missingParameter, fmt.Sprintf("%s?tname=table_name", r.URL.Path))
- diagnostic.HTTPReply(w, rsp, &diagnostic.JSONOutput{}) // nolint:errcheck
+ diagnostic.HTTPReply(w, rsp, &diagnostic.JSONOutput{}) //nolint:errcheck
return
}
@@ -54,11 +54,11 @@ func watchTable(ctx interface{}, w http.ResponseWriter, r *http.Request) {
}
func watchTableEntries(ctx interface{}, w http.ResponseWriter, r *http.Request) {
- r.ParseForm() // nolint:errcheck
+ r.ParseForm() //nolint:errcheck
diagnostic.DebugHTTPForm(r)
if len(r.Form["tname"]) < 1 {
rsp := diagnostic.WrongCommand(missingParameter, fmt.Sprintf("%s?tname=table_name", r.URL.Path))
- diagnostic.HTTPReply(w, rsp, &diagnostic.JSONOutput{}) // nolint:errcheck
+ diagnostic.HTTPReply(w, rsp, &diagnostic.JSONOutput{}) //nolint:errcheck
return
}