File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -99,17 +99,17 @@ func getPayload() (*imgcrypt.Payload, error) {
9999 if err != nil {
100100 return nil , fmt .Errorf ("read payload: %w" , err )
101101 }
102- var any types.Any
103- if err := proto .Unmarshal (data , & any ); err != nil {
102+ var anything types.Any
103+ if err := proto .Unmarshal (data , & anything ); err != nil {
104104 return nil , fmt .Errorf ("could not proto.Unmarshal() decrypt data: %w" , err )
105105 }
106- v , err := typeurl .UnmarshalAny (& any )
106+ v , err := typeurl .UnmarshalAny (& anything )
107107 if err != nil {
108108 return nil , fmt .Errorf ("could not UnmarshalAny() the decrypt data: %w" , err )
109109 }
110110 l , ok := v .(* imgcrypt.Payload )
111111 if ! ok {
112- return nil , fmt .Errorf ("unknown payload type %s" , any .TypeUrl )
112+ return nil , fmt .Errorf ("unknown payload type %s" , anything .TypeUrl )
113113 }
114114 return l , nil
115115}
Original file line number Diff line number Diff line change @@ -35,13 +35,13 @@ import (
3535func WithDecryptedUnpack (data * imgcrypt.Payload ) diff.ApplyOpt {
3636 return func (_ context.Context , desc ocispec.Descriptor , c * diff.ApplyConfig ) error {
3737 data .Descriptor = desc
38- any , err := typeurl .MarshalAny (data )
38+ anything , err := typeurl .MarshalAny (data )
3939 if err != nil {
4040 return fmt .Errorf ("failed to marshal payload: %w" , err )
4141 }
4242
4343 for _ , id := range imgcrypt .PayloadToolIDs {
44- setProcessorPayload (c , id , any )
44+ setProcessorPayload (c , id , anything )
4545 }
4646 return nil
4747 }
You can’t perform that action at this time.
0 commit comments