Skip to content

yehan2002/errors

Repository files navigation

Errors Go Reference Go Report Card

A simple package for creating and wrapping errors in golang

Usage

Creating an error

const ErrEOF = errors.Error("Unexpected end of file")

Wrapping an error

var err error
var config *os.File
if config, err = os.Open("./config.toml");err != nil{
    return errors.Wrap("error getting config file",err)
}

About

A simple package for creation and wrapping errors

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages