#golang リフレクションを使って関数名を取得するには?

Posted by kwmt on Sat, Oct 5, 2013

“reflect”パッケージだけでは取得できないようで、“runtime”パッケージの<a href="http://golang.org/pkg/runtime/#FuncForPC" target="_blank">FuncForPC</a>という関数を使うようです。

参考

  • reflection – How to get the name of a function in Go? – Stack Overflow
  • goken/goken08-reflect.md at master · goken/goken


comments powered by Disqus