Earlier quoted context omitted.
> So, you handle the error in the end, or forcefully and intentionally ignore it. Again, if the code goes boom, it's on the developer, not on Go. Except Go doesn’t actually require you to handle the error. You can forget to handle the error, or forget to do a nil check. And Go won’t tell you until it crashes and explodes at runtime. Technically the user’s fault, but good systems protect the users from their own mista…
Here's an example file: https://files.bayindirh.io/misc/error_example.go I have commented inside the code, but to recap here: - If you don't declare err variable, the code won't compile. - If you don't use err variable, the code won't compile again. So, you need to both declare and use the err variable to be able to compile the code. So you can't forget. Your code will not compile. The only way to "forget" is to decl…
``` a, err := f() b, err := g() if err != nil {} c:=a+b ```
The language will happily build and run, even though it should prevent to let you shoot in the foot.