File tree Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Expand file tree Collapse file tree 2 files changed +9
-6
lines changed Original file line number Diff line number Diff line change 1616package static
1717
1818import (
19- "github.com/go-openapi/swag"
19+ "encoding/json"
20+
2021 "github.com/google/go-containerregistry/pkg/v1/types"
2122 "github.com/sigstore/cosign/pkg/oci"
2223 ctypes "github.com/sigstore/cosign/pkg/types"
@@ -51,7 +52,7 @@ func makeOptions(opts ...Option) (*options, error) {
5152 }
5253
5354 if o .Bundle != nil {
54- b , err := swag . WriteJSON (o .Bundle )
55+ b , err := json . Marshal (o .Bundle )
5556 if err != nil {
5657 return nil , err
5758 }
Original file line number Diff line number Diff line change @@ -24,7 +24,6 @@ import (
2424 "github.com/google/go-containerregistry/pkg/v1/types"
2525 "github.com/sigstore/cosign/pkg/oci"
2626 "github.com/sigstore/sigstore/pkg/cryptoutils"
27- "knative.dev/pkg/kmeta"
2827)
2928
3029const (
@@ -66,9 +65,12 @@ var _ oci.Signature = (*staticLayer)(nil)
6665
6766// Annotations implements oci.Signature
6867func (l * staticLayer ) Annotations () (map [string ]string , error ) {
69- return kmeta .UnionMaps (l .opts .Annotations , map [string ]string {
70- SignatureAnnotationKey : l .b64sig ,
71- }), nil
68+ m := make (map [string ]string , len (l .opts .Annotations )+ 1 )
69+ for k , v := range l .opts .Annotations {
70+ m [k ] = v
71+ }
72+ m [SignatureAnnotationKey ] = l .b64sig
73+ return m , nil
7274}
7375
7476// Payload implements oci.Signature
You can’t perform that action at this time.
0 commit comments