mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-06 02:34:03 +00:00
Not having Kind set in Decode(1) is an error
This commit is contained in:
parent
9eb4ca43d8
commit
811f77894c
@ -36,6 +36,9 @@ func (s *Scheme) Decode(data []byte) (interface{}, error) {
|
||||
if version == "" && s.InternalVersion != "" {
|
||||
return nil, fmt.Errorf("version not set in '%s'", string(data))
|
||||
}
|
||||
if kind == "" {
|
||||
return nil, fmt.Errorf("kind not set in '%s'", string(data))
|
||||
}
|
||||
obj, err := s.NewObject(version, kind)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
Loading…
Reference in New Issue
Block a user