@@ -198,7 +198,7 @@ func CreateAndPushImageSignature(ctx context.Context, imageName string, keyName
198198 }
199199
200200 // the name of the image + the <hash>.sig tag
201- ref , err := registry .ImageReferenceInStubRegistry (ctx , imageName + " :%s-%s.sig" , digest .Algorithm , digest .Hex )
201+ ref , err := registry .ImageReferenceInStubRegistry (ctx , fmt . Sprintf ( "%s :%s-%s.sig" , imageName , digest .Algorithm , digest .Hex ) )
202202 if err != nil {
203203 return ctx , err
204204 }
@@ -306,7 +306,7 @@ func createAndPushAttestationWithPatches(ctx context.Context, imageName, keyName
306306 }
307307
308308 // the name of the image + the <hash>.att tag
309- ref , err := registry .ImageReferenceInStubRegistry (ctx , imageName + " :%s-%s.att" , digest .Algorithm , digest .Hex )
309+ ref , err := registry .ImageReferenceInStubRegistry (ctx , fmt . Sprintf ( "%s :%s-%s.att" , imageName , digest .Algorithm , digest .Hex ) )
310310 if err != nil {
311311 return ctx , err
312312 }
@@ -401,7 +401,7 @@ func createAndPushImageWithLayer(ctx context.Context, imageName string, files *g
401401func createAndPushLayer (ctx context.Context , content string , imageName string ) (context.Context , error ) {
402402 l := s .NewLayer ([]byte (content ), types .OCIUncompressedLayer )
403403
404- ref , err := registry .ImageReferenceInStubRegistry (ctx , "%s" , imageName )
404+ ref , err := registry .ImageReferenceInStubRegistry (ctx , imageName )
405405 if err != nil {
406406 return ctx , err
407407 }
@@ -489,7 +489,7 @@ func createAndPushPlainImage(ctx context.Context, imageName string, patch patchF
489489 return ctx , "" , err
490490 }
491491
492- ref , err := registry .ImageReferenceInStubRegistry (ctx , "%s" , imageName )
492+ ref , err := registry .ImageReferenceInStubRegistry (ctx , imageName )
493493 if err != nil {
494494 return ctx , "" , err
495495 }
@@ -535,7 +535,7 @@ func resolveRefDigest(url string) (string, error) {
535535// createAndPushKeylessImage loads an existing image from disk, along its signature and attestation
536536// into the docker registry.
537537func createAndPushKeylessImage (ctx context.Context , imageName string ) (context.Context , error ) {
538- ref , err := registry .ImageReferenceInStubRegistry (ctx , "%s" , imageName )
538+ ref , err := registry .ImageReferenceInStubRegistry (ctx , imageName )
539539 if err != nil {
540540 return ctx , err
541541 }
@@ -705,7 +705,7 @@ func createAndPushPolicyBundle(ctx context.Context, imageName string, files *god
705705 }
706706 }
707707
708- ref , err := registry .ImageReferenceInStubRegistry (ctx , "%s" , imageName )
708+ ref , err := registry .ImageReferenceInStubRegistry (ctx , imageName )
709709 if err != nil {
710710 return ctx , err
711711 }
@@ -912,7 +912,7 @@ func steal(what string) func(context.Context, string, string) (context.Context,
912912 return ctx , err
913913 }
914914
915- fromRef , err := registry .ImageReferenceInStubRegistry (ctx , signatureFrom + " :%s-%s.%s" , fromDigest .Algorithm , fromDigest .Hex , what )
915+ fromRef , err := registry .ImageReferenceInStubRegistry (ctx , fmt . Sprintf ( "%s :%s-%s.%s" , signatureFrom , fromDigest .Algorithm , fromDigest .Hex , what ) )
916916 if err != nil {
917917 return ctx , err
918918 }
@@ -932,7 +932,7 @@ func steal(what string) func(context.Context, string, string) (context.Context,
932932 return ctx , err
933933 }
934934
935- toRef , err := registry .ImageReferenceInStubRegistry (ctx , imageName + " :%s-%s.%s" , toDigest .Algorithm , toDigest .Hex , what )
935+ toRef , err := registry .ImageReferenceInStubRegistry (ctx , fmt . Sprintf ( "%s :%s-%s.%s" , imageName , toDigest .Algorithm , toDigest .Hex , what ) )
936936 if err != nil {
937937 return ctx , err
938938 }
0 commit comments