Skip to content

Commit

Permalink
Merge pull request #1666 from SaschaSchwarze0/sascha-fix-govet-finding
Browse files Browse the repository at this point in the history
Change to errors.New because strings passed to fmt.Errorf should be constants according to govet
  • Loading branch information
openshift-merge-bot[bot] authored Aug 14, 2024
2 parents d0fe9ca + 3197fa6 commit 4015eba
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 4015eba

Please sign in to comment.