I need to build a function which merges responses from multiple other functions into one (struct). Currently I'm thinking that the only way would be to create a map[string]interface{} and then range over the fields of structs I need to merge and assign field name -> value as key, values in the map. Is there any other way? I basically just need to embed two structs into one.
Aucun commentaire:
Enregistrer un commentaire