Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/posener/dont

A towel, is about the most massively useful thing an interstellar hitchhiker can have
https://github.com/posener/dont

Last synced: 2 months ago
JSON representation

A towel, is about the most massively useful thing an interstellar hitchhiker can have

Awesome Lists containing this project

README

        

# Package dont

Here you can find the towel you need to travel the galaxy.

### dont.Panic

The `dont.Panic` function can help you handle errors that you expect not to have.

Usage example:

```go
package hitchhike

import (
"os/user"
"github.com/posener/dont"
)

var arthur = dont.Panic(user.Current())
```

> It is recommended only to use the `dont.Panic` function to initialize package scope variables,
> where in case of a panic, the program will crash on loading time.