fix(hermes): Define the duplicated format string once, then replace each of the four fmt.Errorf format literals with orasCommandErrorFormat. This is a localized behavior-preserving Sonar S1192 fix. (incident sonar/metis/go:S1192/AZ2z_XbvKy9i4pkIqvM-)
This commit is contained in:
parent
d7a1dc0b74
commit
125530c557
@ -8,6 +8,8 @@ import (
|
||||
"strings"
|
||||
)
|
||||
|
||||
const orasCommandErrorFormat = "%w: %s"
|
||||
|
||||
func orasLogin(registry, username, password string) error {
|
||||
if strings.TrimSpace(username) == "" || strings.TrimSpace(password) == "" {
|
||||
return fmt.Errorf("harbor credentials missing")
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user