Occasionally in go we want convert our structured data into an unstructured format, such as a map[string]interface{} for struct like: type Foo struct { A Bar `json:"a"` B Bar `json:"b"` C Bar `json:"c"` D Bar `json:"d"` E Bar `json:"e"` F int `json:"f"` G uint `json:"g"` H string `json:"h"` } type Bar struct { Bar string `json:"bar"` } There are a couple ways we can convert it into a map. manually func base(foo Foo) map[string]interface{} { result := make(map[string]interface{}) result["A"] = foo.