Skip to content

Instantly share code, notes, and snippets.

@prostoiChelovek
Created June 8, 2018 14:48
Show Gist options
  • Save prostoiChelovek/2a14f8fae5fd13684906a28eca8275df to your computer and use it in GitHub Desktop.
Save prostoiChelovek/2a14f8fae5fd13684906a28eca8275df to your computer and use it in GitHub Desktop.
Convert map[string]interface{} to map[string]string
// MI2MS - Map with Interface{} values to Map with String values
func MI2MS(m map[string]interface{}) map[string]string {
tmp := map[string]string{}
for k, v := range m {
tmp[k] = fmt.Sprintf("%v", v)
}
return tmp
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment