I've recently watch this talk by Liz Rice (which I highly recommend!), and I've seen that instead of writing:
func main() {
if err := someFunc(); err != nil {
panic(err)
}
}
she does:
func main() {
must(someFunc())
}
func must(err error) {
panic(err)
}
Is it an idiomatic way to handle errors? IMO it does not improve readability, and I feel that it does not follows the Go proverb "Clear is better than clever". What do you think?