Skip to content

Package radar help to debug nested function call and Trace current file/line

License

Notifications You must be signed in to change notification settings

thedevsaddam/radar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Package radar

GoDoc License

Package radar help to debug nested function call and Trace current file/line

Installation

Install the package using

$ go get github.com/thedevsaddam/radar/...

Usage

To use the package import it in your *.go code

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

➜ 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

➜ 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.

About

Package radar help to debug nested function call and Trace current file/line

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages