MCPcopy Create free account
hub / github.com/VirusTotal/vt-cli / flattenMap

Function flattenMap

csv/flatten.go:104–114  ·  view source on GitHub ↗
(v reflect.Value, prefix string, m map[string]interface{})

Source from the content-addressed store, hash-verified

102}
103
104func flattenMap(v reflect.Value, prefix string, m map[string]interface{}) (err error) {
105 if prefix != "" {
106 prefix += "/"
107 }
108 for _, k := range v.MapKeys() {
109 if err := flattenValue(v.MapIndex(k), fmt.Sprintf("%v%v", prefix, k.Interface()), m); err != nil {
110 return err
111 }
112 }
113 return nil
114}

Callers 1

flattenValueFunction · 0.85

Calls 1

flattenValueFunction · 0.85

Tested by

no test coverage detected