Commit 6dbecc2a authored by Daniel Smith's avatar Daniel Smith

Merge pull request #8165 from feihujiang/checkjsonformat

Check json format firstly
parents c27999da d36173e8
...@@ -59,7 +59,7 @@ func (SimpleMetaFactory) Interpret(data []byte) (version, kind string, err error ...@@ -59,7 +59,7 @@ func (SimpleMetaFactory) Interpret(data []byte) (version, kind string, err error
}{} }{}
err = json.Unmarshal(data, &findKind) err = json.Unmarshal(data, &findKind)
if err != nil { if err != nil {
return "", "", fmt.Errorf("couldn't get version/kind: %v", err) return "", "", fmt.Errorf("couldn't get version/kind; json parse error: %v", err)
} }
return findKind.APIVersion, findKind.Kind, nil return findKind.APIVersion, findKind.Kind, nil
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment