Skip to content

Instantly share code, notes, and snippets.

@sagar23sj
Created September 7, 2021 16:00
example of using error packeg in go
package main
import (
"errors"
"fmt"
)
func main() {
err := errors.New("it's an error")
if err != nil {
fmt.Println(err.Error())
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment