Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/posener/dont
- Owner: posener
- Created: 2021-04-14T18:32:16.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-02-19T14:27:10.000Z (almost 3 years ago)
- Last Synced: 2024-10-04T19:59:03.325Z (3 months ago)
- Language: Go
- Size: 4.88 KB
- Stars: 6
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
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 hitchhikeimport (
"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.