1
0
mirror of https://github.com/rancher/steve.git synced 2025-04-27 19:05:09 +00:00

Move type => _type for k8s objects

This commit is contained in:
Darren Shepherd 2019-08-08 16:39:37 -07:00
parent 965b94a32d
commit 9e67a3ceb8

View File

@ -17,6 +17,10 @@ type defaultMapper struct {
}
func (d *defaultMapper) FromInternal(data map[string]interface{}) {
if t, ok := data["type"]; ok {
data["_type"] = t
}
if _, ok := data["id"]; ok || data == nil {
return
}