From da62a7492a3c4fdfff323fc4a340a92dc472ca9e Mon Sep 17 00:00:00 2001 From: Frederik Ring Date: Tue, 20 Aug 2024 10:58:31 +0200 Subject: [PATCH] Fix complaint raised by linter --- .golangci.yml | 2 +- internal/errwrap/wrap.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index 53ccccf7..dc89d3f0 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -6,4 +6,4 @@ linters: - govet output: formats: - - format: github-actions + - format: colored-line-number diff --git a/internal/errwrap/wrap.go b/internal/errwrap/wrap.go index a64142b1..a3b48d58 100644 --- a/internal/errwrap/wrap.go +++ b/internal/errwrap/wrap.go @@ -21,7 +21,7 @@ func Wrap(err error, msg string) error { chunks := strings.Split(frame.Function, "/") withCaller := fmt.Sprintf("%s: %s", chunks[len(chunks)-1], msg) if err == nil { - return fmt.Errorf(withCaller) + return errors.New(withCaller) } return fmt.Errorf("%s: %w", withCaller, err) }