vendor: remove dep and use vndr
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
This commit is contained in:
parent
16f44674a4
commit
148e72d81e
16131 changed files with 73815 additions and 4235138 deletions
20
vendor/k8s.io/apimachinery/pkg/runtime/codec.go
generated
vendored
20
vendor/k8s.io/apimachinery/pkg/runtime/codec.go
generated
vendored
|
@ -161,11 +161,12 @@ func (c *parameterCodec) DecodeParameters(parameters url.Values, from schema.Gro
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
targetGVK := targetGVKs[0]
|
||||
if targetGVK.GroupVersion() == from {
|
||||
return c.convertor.Convert(¶meters, into, nil)
|
||||
for i := range targetGVKs {
|
||||
if targetGVKs[i].GroupVersion() == from {
|
||||
return c.convertor.Convert(¶meters, into, nil)
|
||||
}
|
||||
}
|
||||
input, err := c.creator.New(from.WithKind(targetGVK.Kind))
|
||||
input, err := c.creator.New(from.WithKind(targetGVKs[0].Kind))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
@ -194,16 +195,17 @@ func (c *parameterCodec) EncodeParameters(obj Object, to schema.GroupVersion) (u
|
|||
}
|
||||
|
||||
type base64Serializer struct {
|
||||
Serializer
|
||||
Encoder
|
||||
Decoder
|
||||
}
|
||||
|
||||
func NewBase64Serializer(s Serializer) Serializer {
|
||||
return &base64Serializer{s}
|
||||
func NewBase64Serializer(e Encoder, d Decoder) Serializer {
|
||||
return &base64Serializer{e, d}
|
||||
}
|
||||
|
||||
func (s base64Serializer) Encode(obj Object, stream io.Writer) error {
|
||||
e := base64.NewEncoder(base64.StdEncoding, stream)
|
||||
err := s.Serializer.Encode(obj, e)
|
||||
err := s.Encoder.Encode(obj, e)
|
||||
e.Close()
|
||||
return err
|
||||
}
|
||||
|
@ -214,7 +216,7 @@ func (s base64Serializer) Decode(data []byte, defaults *schema.GroupVersionKind,
|
|||
if err != nil {
|
||||
return nil, nil, err
|
||||
}
|
||||
return s.Serializer.Decode(out[:n], defaults, into)
|
||||
return s.Decoder.Decode(out[:n], defaults, into)
|
||||
}
|
||||
|
||||
// SerializerInfoForMediaType returns the first info in types that has a matching media type (which cannot
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue