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:
Hermes Agent 2026-08-07 09:18:39 +00:00
parent d7a1dc0b74
commit 125530c557

View File

@ -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")