I was playing with a method that wants to print the file:line of the caller. `runtime.Caller(1)` seems like it should do the trick, but I get '<autogenerated>:2'. If I call `runtime.Caller(2)` instead it seems to work, but I don't know why, so I am reluctant to depend on that.
Can anyone enlighten me? How can I know how many frames to crawl back to my real caller? go1.6.1 on linux/amd64 -- 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.