Skip to content

Latest commit

 

History

History
33 lines (19 loc) · 615 Bytes

README.md

File metadata and controls

33 lines (19 loc) · 615 Bytes

Trace

GoDoc Test workflow

Package for error handling and error reporting

Read more here:

https://goteleport.com/blog/golang-error-handling/

Capture file, line and function

import (
     "github.com/gravitational/trace"
)

func someFunc() error {
   return trace.Wrap(err)
}


func main() {
  err := someFunc()
  fmt.Println(err.Error()) // prints file, line and function
}