Skip to content

Instantly share code, notes, and snippets.

@Pomeha
Last active September 11, 2019 14:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Pomeha/de8c875f50d324f9384db684b22cec90 to your computer and use it in GitHub Desktop.
Save Pomeha/de8c875f50d324f9384db684b22cec90 to your computer and use it in GitHub Desktop.
var dat map[string]interface{}
var parseString string
if cachedPosts != nil {
parseString = fmt.Sprintf("%s", someJsonString)
if err = json.Unmarshal([]byte(parseString), &dat); err != nil {
panic(err)
}
}
// And now you get perfect interfaced json! Lucky you!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment