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

Function flatten

csv/flatten.go:23–27  ·  view source on GitHub ↗
(i interface{})

Source from the content-addressed store, hash-verified

21)
22
23func flatten(i interface{}) (map[string]interface{}, error) {
24 result := make(map[string]interface{})
25 err := flattenValue(reflect.ValueOf(i), "", result)
26 return result, err
27}
28
29func flattenValue(v reflect.Value, prefix string, m map[string]interface{}) error {
30 switch v.Kind() {

Callers 2

EncodeMethod · 0.85
TestFlattenFunction · 0.85

Calls 1

flattenValueFunction · 0.85

Tested by 1

TestFlattenFunction · 0.68