Skip to content

Instantly share code, notes, and snippets.

@rafrombrc
Created September 22, 2014 22:47
Show Gist options
  • Save rafrombrc/4b69ffa1bf0f5cb4375e to your computer and use it in GitHub Desktop.
Save rafrombrc/4b69ffa1bf0f5cb4375e to your computer and use it in GitHub Desktop.
var tmp map[string]interface{}
tmp, ok = v.(map[string]interface{})
if !ok {
return result, errors.New("invalid path")
}
v, ok = tmp[ss[1]]
if !ok {
return result, errors.New("invalid path")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment