Skip to content

newmo-oss/go-caller

Repository files navigation

go-caller Go ReferenceGo Report Card

go-caller is a library for collecting stack traces at the runtime.

Usage

package main

import (
	"fmt"

	"github.com/newmo-oss/go-caller"
)

func main() {
	stacktrace := caller.New(1)
	frame := stacktrace[0]
	// main.go:10 main.main
	fmt.Printf("%s:%d %s.%s\n", frame.File(), frame.Line(), frame.PkgName(), frame.FuncName())
}

License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages