Skip to content

Commit

Permalink
Change to errors.New because strings passed to fmt.Errorf should be c…
Browse files Browse the repository at this point in the history
…onstants according to govet
  • Loading branch information
SaschaSchwarze0 committed Aug 14, 2024
1 parent d0fe9ca commit 3197fa6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/image/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ package image
import (
"bytes"
"encoding/json"
"errors"
"fmt"
"io"
"log"
Expand Down Expand Up @@ -173,7 +174,7 @@ func dockerHubLogin(username string, password string) (string, error) {
return fmt.Sprintf("JWT %s", loginToken.Token), nil

default:
return "", fmt.Errorf(string(bodyData))
return "", errors.New(string(bodyData))
}
}

Expand Down

0 comments on commit 3197fa6

Please sign in to comment.