@@ -530,11 +530,10 @@ func (ic *ImageWriter) Applier() diff.Applier {
530530func defaultImageConfig () ([]byte , error ) {
531531 pl := platforms .Normalize (platforms .DefaultSpec ())
532532
533- img := ocispecs.Image {
534- Architecture : pl .Architecture ,
535- OS : pl .OS ,
536- Variant : pl .Variant ,
537- }
533+ img := ocispecs.Image {}
534+ img .Architecture = pl .Architecture
535+ img .OS = pl .OS
536+ img .Variant = pl .Variant
538537 img .RootFS .Type = "layers"
539538 img .Config .WorkingDir = "/"
540539 img .Config .Env = []string {"PATH=" + system .DefaultPathEnv (pl .OS )}
@@ -543,13 +542,12 @@ func defaultImageConfig() ([]byte, error) {
543542}
544543
545544func attestationsConfig (layers []ocispecs.Descriptor ) ([]byte , error ) {
546- img := ocispecs.Image {
547- Architecture : intotoPlatform .Architecture ,
548- OS : intotoPlatform .OS ,
549- OSVersion : intotoPlatform .OSVersion ,
550- OSFeatures : intotoPlatform .OSFeatures ,
551- Variant : intotoPlatform .Variant ,
552- }
545+ img := ocispecs.Image {}
546+ img .Architecture = intotoPlatform .Architecture
547+ img .OS = intotoPlatform .OS
548+ img .OSVersion = intotoPlatform .OSVersion
549+ img .OSFeatures = intotoPlatform .OSFeatures
550+ img .Variant = intotoPlatform .Variant
553551 img .RootFS .Type = "layers"
554552 for _ , layer := range layers {
555553 img .RootFS .DiffIDs = append (img .RootFS .DiffIDs , digest .Digest (layer .Annotations ["containerd.io/uncompressed" ]))
0 commit comments