Last active
August 29, 2015 14:27
-
-
Save clinyong/0368d89c8efe224790f2 to your computer and use it in GitHub Desktop.
Show func signature
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
func showSignature(any interface{}) string{ | |
fn := reflect.ValueOf(any) | |
if fn.Kind() != reflect.Func { | |
return | |
} | |
sig := fn.Type().String() | |
return sig | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment