https://godoc.org/runtime#Caller
https://godoc.org/runtime#FuncForPC

On Wed, Jul 13, 2016 at 1:48 PM, Harry <hiroma...@gmail.com> wrote:

> Hello, everyone.
>
> As title, I'm trying the below.
>
> func SomethingFunc() {
>   fmt.Printf("func is %s\n", funcName)
>   /* code */
> }
>
> I want to show func name when running each func.
> If I could get func name automatically, same code can be used.
>
>
> Thank you.
>
> Harry.
>
> --
> You received this message because you are subscribed to the Google Groups
> "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to golang-nuts+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to