in internal/template/funcmap.go [55:72]
func get(m map[string]interface{}, key string, def ...interface{}) interface{} {
split := strings.Split(key, ".")
for i, k := range split {
v, ok := m[k]
switch {
case !ok:
if len(def) == 1 {
return def[0]
}
return nil
case i == len(split)-1:
return v
default:
m = v.(map[string]interface{})
}
}
return nil
}