debugging - Is there a way to get the source code filename and line number in Go? -


in c/c++ can use __file__ , __line__ access current file , line number.

does go provide similar?

indeed does:

http://golang.org/pkg/runtime/#caller

runtime.caller can used file name/line number of calling functions, too.


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -