mirror of https://github.com/k3s-io/k3s
Not having Kind set in Decode(1) is an error
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