posener / dont

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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:

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.

About

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


Languages

Language:Go 100.0%