There was some discussion about this recently so I’m not going to re-hash it, but in general, don’t panic . Check out the responses on this thread for more info:
I started coding in Go a few months ago and now that I’m starting to get comfy with the language I compiled some utility functions and uploaded them to Github. One of them is sort of a reimplementation of Rust’s unwrap() for more convenient error handling. Here are the docs with all the explanation and examples: g package - github.com/n-mou/yagul/g - Go Packages but long story short:
import (
"os"
"github.com/n-mou/yagul/itertools"
)
// This:
fileInfo := g.Unwrap(os.Stat("."))
// Is e…