Enable more linters for new code

This commit is contained in:
Katrina Verey
2022-03-30 17:34:38 -04:00
parent 71bf0d5d14
commit b0d2e4bdcd
7 changed files with 43 additions and 33 deletions

View File

@@ -317,7 +317,7 @@ func toTypeMeta(ext interface{}) (yaml.TypeMeta, bool) {
}
apiVersion := m[versionKey].(string)
if g := m[groupKey].(string); g != "" {
if g, ok := m[groupKey].(string); ok && g != "" {
apiVersion = g + "/" + apiVersion
}
return yaml.TypeMeta{Kind: m[kindKey].(string), APIVersion: apiVersion}, true