updates for print format messages

Signed-off-by: Adam Martin <adam.martin@ranchergovernment.com>
This commit is contained in:
Adam Martin
2026-05-12 17:40:27 -04:00
parent 4ec4bcc194
commit eb7b63f410
3 changed files with 10 additions and 10 deletions
+1 -1
View File
@@ -134,7 +134,7 @@ func storeImage(ctx context.Context, s *store.Layout, i v1.Image, platform strin
// rename image name in store
newRef, err := name.ParseReference(rewrite)
if err != nil {
l.Errorf("unable to parse rewrite name: %w", err)
l.Errorf("unable to parse rewrite name: %v", err)
}
rewriteReference(ctx, s, r, newRef)
}
+4 -4
View File
@@ -261,7 +261,7 @@ func processContent(ctx context.Context, fi *os.File, o *flags.SyncOpts, s *stor
if i.Tlog {
tlog = i.Tlog
}
l.Debugf("transparency log for verification [%b]", tlog)
l.Debugf("transparency log for verification [%t]", tlog)
if err := cosign.VerifySignature(ctx, s, key, tlog, i.Name, rso, ro); err != nil {
l.Errorf("signature verification failed for image [%s]... skipping...\n%v", i.Name, err)
@@ -321,7 +321,7 @@ func processContent(ctx context.Context, fi *os.File, o *flags.SyncOpts, s *stor
if i.Tlog {
tlog = i.Tlog
}
l.Debugf("transparency log for verification [%b]", tlog)
l.Debugf("transparency log for verification [%t]", tlog)
if err := cosign.VerifyKeylessSignature(ctx, s, certIdentity, certIdentityRegexp, certOidcIssuer, certOidcIssuerRegexp, certGithubWorkflowRepository, tlog, i.Name, rso, ro); err != nil {
l.Errorf("keyless signature verification failed for image [%s]... skipping...\n%v", i.Name, err)
@@ -402,7 +402,7 @@ func processContent(ctx context.Context, fi *os.File, o *flags.SyncOpts, s *stor
if i.Tlog {
tlog = i.Tlog
}
l.Debugf("transparency log for verification [%b]", tlog)
l.Debugf("transparency log for verification [%t]", tlog)
if err := cosign.VerifySignature(ctx, s, key, tlog, i.Name, rso, ro); err != nil {
l.Errorf("signature verification failed for image [%s]... skipping...\n%v", i.Name, err)
@@ -462,7 +462,7 @@ func processContent(ctx context.Context, fi *os.File, o *flags.SyncOpts, s *stor
if i.Tlog {
tlog = i.Tlog
}
l.Debugf("transparency log for verification [%b]", tlog)
l.Debugf("transparency log for verification [%t]", tlog)
if err := cosign.VerifyKeylessSignature(ctx, s, certIdentity, certIdentityRegexp, certOidcIssuer, certOidcIssuerRegexp, certGithubWorkflowRepository, tlog, i.Name, rso, ro); err != nil {
l.Errorf("keyless signature verification failed for image [%s]... skipping...\n%v", i.Name, err)
+5 -5
View File
@@ -45,13 +45,13 @@ func Archive(ctx context.Context, dir, outfile string, compression archives.Comp
l.Debugf("removing existing output file: [%s]", outfile)
if err := os.RemoveAll(outfile); err != nil {
errMsg := fmt.Errorf("failed to remove existing output file [%s]: %w", outfile, err)
l.Debugf(errMsg.Error())
l.Debugf("%s", errMsg.Error())
return errMsg
}
if !isExist(dir) {
errMsg := fmt.Errorf("directory [%s] does not exist, cannot proceed with archival", dir)
l.Debugf(errMsg.Error())
l.Debugf("%s", errMsg.Error())
return errMsg
}
@@ -66,7 +66,7 @@ func Archive(ctx context.Context, dir, outfile string, compression archives.Comp
})
if err != nil {
errMsg := fmt.Errorf("error mapping files from directory [%s]: %w", dir, err)
l.Debugf(errMsg.Error())
l.Debugf("%s", errMsg.Error())
return errMsg
}
l.Debugf("successfully mapped files for directory [%s]", dir)
@@ -76,7 +76,7 @@ func Archive(ctx context.Context, dir, outfile string, compression archives.Comp
outf, err := os.Create(outfile)
if err != nil {
errMsg := fmt.Errorf("error creating output file [%s]: %w", outfile, err)
l.Debugf(errMsg.Error())
l.Debugf("%s", errMsg.Error())
return errMsg
}
defer func() {
@@ -96,7 +96,7 @@ func Archive(ctx context.Context, dir, outfile string, compression archives.Comp
err = format.Archive(context.Background(), outf, files)
if err != nil {
errMsg := fmt.Errorf("error during archive creation for output file [%s]: %w", outfile, err)
l.Debugf(errMsg.Error())
l.Debugf("%s", errMsg.Error())
return errMsg
}
l.Debugf("archive created successfully [%s]", outfile)