Skip to content

Instantly share code, notes, and snippets.

@clinyong
Last active August 29, 2015 14:27
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 clinyong/0368d89c8efe224790f2 to your computer and use it in GitHub Desktop.
Save clinyong/0368d89c8efe224790f2 to your computer and use it in GitHub Desktop.
Show func signature
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