Skip to content

Commit

Permalink
fix: golangci-lint warning (v1.60.x)
Browse files Browse the repository at this point in the history
Error: pkg/server/server.go:468:18: printf: non-constant format string in call to github.com/sirupsen/logrus.Errorf (govet)
logrus.Errorf(fmt.Sprintf("failed to close artifact distribution file %s: %+v", distro.FileLocation, err))

Signed-off-by: Kairo Araujo <kairo.araujo@testifysec.com>
  • Loading branch information
kairoaraujo committed Aug 19, 2024
1 parent d8c9aff commit 898c419
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -465,7 +465,7 @@ func (s *Server) DownloadArtifactHandler(w http.ResponseWriter, r *http.Request)

defer func() {
if err := file.Close(); err != nil {
logrus.Errorf(fmt.Sprintf("failed to close artifact distribution file %s: %+v", distro.FileLocation, err))
logrus.Errorf("failed to close artifact distribution file %s: %+v", distro.FileLocation, err)

Check warning on line 468 in pkg/server/server.go

View check run for this annotation

Codecov / codecov/patch

pkg/server/server.go#L468

Added line #L468 was not covered by tests
}
}()

Expand Down

0 comments on commit 898c419

Please sign in to comment.