I am trying to create a generic method in Go that will fill a struct using data from a map[string]interface{}. For example, the method signature an
struct
map[string]interface{}
There are two steps:
Below is an example:
dbByte, _ := json.Marshal(dbContent) _ = json.Unmarshal(dbByte, &MyStruct)