Replace interface{} by any (#901)

Signed-off-by: yxxhero <aiopsclub@163.com>
This commit is contained in:
yxxhero
2023-06-16 10:49:05 +09:00
committed by GitHub
parent 94fe519ed5
commit c55fa0f765
46 changed files with 394 additions and 394 deletions
+2 -2
View File
@@ -128,7 +128,7 @@ func globYamlFilenames(dir string) (sets.Set[string], error) {
return set, nil
}
type resource map[string]interface{}
type resource map[string]any
type meta struct {
apiVersion string
@@ -146,7 +146,7 @@ func (res resource) getMeta() meta {
m.apiVersion = apiVersion
kind, _ := res["kind"].(string)
m.kind = kind
metadata, _ := res["metadata"].(map[string]interface{})
metadata, _ := res["metadata"].(map[string]any)
name, _ := metadata["name"].(string)
m.name = name
namespace, _ := metadata["namespace"].(string)