Skip to content

Latest commit

 

History

History
21 lines (15 loc) · 613 Bytes

File metadata and controls

21 lines (15 loc) · 613 Bytes

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)
}