Created
June 8, 2018 14:48
-
-
Save prostoiChelovek/2a14f8fae5fd13684906a28eca8275df to your computer and use it in GitHub Desktop.
Convert map[string]interface{} to map[string]string
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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