Check json format firstly

Check json format firstly

check json format firstly

check json format firstly
This commit is contained in:
feihujiang 2015-05-13 15:37:02 +08:00
parent efb42b302d
commit d36173e855

View File

@ -59,7 +59,7 @@ func (SimpleMetaFactory) Interpret(data []byte) (version, kind string, err error
}{}
err = json.Unmarshal(data, &findKind)
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
}