Fix linting error
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
Torjus Håkestad 2022-01-24 20:32:49 +01:00
parent 030806b0c4
commit f78c68d46c
3 changed files with 4 additions and 4 deletions

View File

@ -28,6 +28,7 @@ linters:
- stylecheck - stylecheck
- exportloopref - exportloopref
- godot - godot
linters-settings: linters-settings:
gomnd: gomnd:
ignored-functions: ignored-functions:

View File

@ -11,9 +11,9 @@ pipeline:
event: [push, pull_request, tag, deployment] event: [push, pull_request, tag, deployment]
lint: lint:
image: golangci/golangci-lint:latest image: golangci/golangci-lint:v1.43.0
commands: commands:
- golangci-lint run -v - golangci-lint run
when: when:
event: [push, pull_request] event: [push, pull_request]

View File

@ -139,8 +139,7 @@ func (s *HTTPServer) HandlerAPIFileDelete(w http.ResponseWriter, r *http.Request
return return
} }
err := s.Files.Delete(id) if err := s.Files.Delete(id); err != nil {
if err != nil {
w.WriteHeader(http.StatusBadRequest) w.WriteHeader(http.StatusBadRequest)
return return
} }