INNER CODE UNIT · Go
isResultEmpty
itaysk/kubectl-neat · cmd/neat.go:204
func isResultEmpty(j gjson.Result) bool {
v := j.Value()
switch vt := v.(type) {
// empty string != lack of string. keep empty strings as it's meaningful data
// case string:
// return vt == ""
case []interface{}:
return len(vt) == 0
case map[string]interface{}:
return len(vt) == 0
}
return false
}