Created
June 15, 2014 05:30
-
-
Save bit4bit/d6af7786cdaf641b9756 to your computer and use it in GitHub Desktop.
never omit check type assertion
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
//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