From f78c68d46cf701aa672dd939166e619e414068d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torjus=20H=C3=A5kestad?= Date: Mon, 24 Jan 2022 20:32:49 +0100 Subject: [PATCH] Fix linting error --- .golangci.yml | 1 + .woodpecker.yml | 4 ++-- api/http.go | 3 +-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index d984e85..105af5a 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -28,6 +28,7 @@ linters: - stylecheck - exportloopref - godot + linters-settings: gomnd: ignored-functions: diff --git a/.woodpecker.yml b/.woodpecker.yml index e932105..a26af8e 100644 --- a/.woodpecker.yml +++ b/.woodpecker.yml @@ -11,9 +11,9 @@ pipeline: event: [push, pull_request, tag, deployment] lint: - image: golangci/golangci-lint:latest + image: golangci/golangci-lint:v1.43.0 commands: - - golangci-lint run -v + - golangci-lint run when: event: [push, pull_request] diff --git a/api/http.go b/api/http.go index ac53d30..b4215b0 100644 --- a/api/http.go +++ b/api/http.go @@ -139,8 +139,7 @@ func (s *HTTPServer) HandlerAPIFileDelete(w http.ResponseWriter, r *http.Request return } - err := s.Files.Delete(id) - if err != nil { + if err := s.Files.Delete(id); err != nil { w.WriteHeader(http.StatusBadRequest) return }