-
-
Save sagar290/dda3514304930a7e21e080710dcda3d8 to your computer and use it in GitHub Desktop.
Golang Errors Stacktrace and Line Number
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://godoc.org/github.com/pkg/errors#Frame.Format | |
package main | |
import ( | |
"fmt" | |
"github.com/pkg/errors" | |
) | |
func main() { | |
err := errors.New("Error generated here") | |
if err != nil { | |
fmt.Printf("ERROR: %+v\r\n", errors.Wrap(err, "")) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment