Skip to content

gravitational/trace

Folders and files

NameName
Last commit message
Last commit date
Dec 21, 2022
Aug 7, 2023
Aug 7, 2023
Jul 30, 2015
Oct 31, 2015
Mar 13, 2024
Aug 7, 2023
Aug 4, 2023
Mar 13, 2024
Mar 13, 2024
Jan 18, 2023
Jan 18, 2023
Aug 7, 2023
Mar 13, 2024

Repository files navigation

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
}