From d1acb852975eda5b9a76f5c0f0437ac7da6c4d8c Mon Sep 17 00:00:00 2001 From: Knut Ahlers Date: Sat, 28 Aug 2021 17:58:31 +0200 Subject: [PATCH] Lint: "Fix" two linter errors Signed-off-by: Knut Ahlers --- action_counter.go | 2 +- swagger.go | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/action_counter.go b/action_counter.go index ab6de6d..797d0dd 100644 --- a/action_counter.go +++ b/action_counter.go @@ -132,7 +132,7 @@ func routeActorCounterSetValue(w http.ResponseWriter, r *http.Request) { value int64 ) - if value, err = strconv.ParseInt(r.FormValue("value"), 10, 64); err != nil { + if value, err = strconv.ParseInt(r.FormValue("value"), 10, 64); err != nil { //nolint:gomnd // Those numbers are static enough http.Error(w, errors.Wrap(err, "parsing value").Error(), http.StatusBadRequest) return } diff --git a/swagger.go b/swagger.go index 66b573f..fdf9f08 100644 --- a/swagger.go +++ b/swagger.go @@ -54,6 +54,7 @@ func handleSwaggerRequest(w http.ResponseWriter, r *http.Request) { } } +//nolint:gocyclo // Makes no sense to split just to spare a little complexity func registerSwaggerRoute(route plugins.HTTPRouteRegistrationArgs) error { fullPath := strings.Join([]string{ "",