Package radar help to debug nested function call and Trace current file/line
Install the package using
$ go get github.com/thedevsaddam/radar/...
To use the package import it in your *.go
code
import "github.com/thedevsaddam/radar"
package main
import "github.com/thedevsaddam/radar"
func main() {
foo()
}
func foo() {
baz()
}
func baz() {
radar.Beam()
}
Output
➜ go run main.go
-> /Users/thedevsaddam/Workspace/go/code/radar/main.go: main.baz(14)
package main
import "github.com/thedevsaddam/radar"
func main() {
foo()
}
func foo() {
baz()
}
func baz() {
radar.Trace()
}
Output
➜ go run main.go
-> 1: /Users/thedevsaddam/Workspace/go/code/radar/main.go: main.baz(14)
-> 2: /Users/thedevsaddam/Workspace/go/code/radar/main.go: main.foo(10)
-> 3: /Users/thedevsaddam/Workspace/go/code/radar/main.go: main.main(6)
If you are interested to make the package better please send pull requests or create an issue so that others can fix. Read the contribution guide here.
The radar is an open-source software licensed under the MIT License.