Package radar
Package radar
Package radar help to debug nested function call and Trace current file/line
Installation
Install the package using
go
$ go get github.com/thedevsaddam/radar/...
Usage
To use the package import it in your *.go
code
go
import "github.com/thedevsaddam/radar"
Example
Beam
package main
import "github.com/thedevsaddam/radar"
func main() {
foo()
}
func foo() {
baz()
}
func baz() {
radar.Beam()
}
Output
bash
➜ go run main.go
-> /Users/thedevsaddam/Workspace/go/code/radar/main.go: main.baz(14)
Trace
package main
import "github.com/thedevsaddam/radar"
func main() {
foo()
}
func foo() {
baz()
}
func baz() {
radar.Trace()
}
Output
bash
➜ 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)
Contribution
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.
License
The radar is an open-source software licensed under the MIT License.