radar

package module
v0.0.0-...-b87920d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 23, 2018 License: MIT Imports: 4 Imported by: 0

README

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.

Documentation

Overview

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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Beam

func Beam(skip ...int) (err error)

Beam print the current file, function and line information

func Trace

func Trace() (err error)

Trace print the current file, function and line information for all program counter

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL