There's no margin to "forget".
However, if a function just returns an error, but no result value, it is indeed easy to silently drop that error without realizing it by simply invoking the function and not catching the result at all. To which, again, I'd highly recommend using linters at commit time or even code save time.
ah, yeah, great idea. in practice this just means that most Go projects are minefields of
if err != nil { panic(err) }
or if err != nil { return err }
ie a manual & repetitive implementation of assert for the first case and manual & repetitive implementation of an exception call stack for the second. thank you very much, I'll take the automated version known as exceptions instead.[citation needed]
Take this anecdote for whatever it's worth to you.
func main() {
fmt.Println(“Hello”)
}If a function only returns an error, or if it returns both a value and an error and you care for neither, you can absolutely ignore them entirely.
And when you can "suppress" an error and still access the value, it's not really impressive.