Skip to content

go-onerr/onerr

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

onerr

Build Status Code Coverage Documentation

onerr is a very small package that provides functions to quickly handle errors.

Example

f, err := os.Create("output.txt")
onerr.Panic(err)             // Panics if the file cannot be created.
defer onerr.LogFunc(f.Close) // Logs any error while closing the file.

_, err = f.WriteString("output")
// Logs any write error like: error while writing "output.txt": disk is full
onerr.Logf(err, "error while writing %q", f.Name())

Documentation

https://godoc.org/gopkg.in/onerr.v1

Download

go get gopkg.in/onerr.v1

License

MIT

About

A Go library to quickly handle errors.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages