Created
June 23, 2015 21:26
-
-
Save canthefason/f4be2c15c7ef210a3d34 to your computer and use it in GitHub Desktop.
Some reflection tips
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
// for checking if an operand implements Context interface | |
contextType := reflect.TypeOf((*context.Context)(nil)).Elem() | |
mtype.Implements(contextType) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment