Skip to content

Instantly share code, notes, and snippets.

@bit4bit
Created June 15, 2014 05:30
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 bit4bit/d6af7786cdaf641b9756 to your computer and use it in GitHub Desktop.
Save bit4bit/d6af7786cdaf641b9756 to your computer and use it in GitHub Desktop.
never omit check type assertion
//this can save a lot time of debugging
//check type assertion
if v, ok := varI.(T); ok {
..
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment