4 ms·
Even Golang de facto suffers from this. I don't think I can name a time I saw someone check the return value of fmt.Print or log.Print. Not checking the retur
by moltenguardian 5y ago
Even Golang de facto suffers from this. I don't think I can name a time I saw someone check the return value of fmt.Print or log.Print. Not checking the return value still seems the the "right" thing to do.
- silisili 5y agoThis seems to be checking return values, which is a very unixy thing to do. Most Go in the wild is doing way more than a typical *nix binary, so the use case differs. If you want a resilient system, you don't die on print and log failures.
- rini17 5y agoUsually the result of ignoring "disk full" or partial writes is not resilience but byzantine failure instead.
- hnlmorg 5y agoI do. But then I’m writing a shell (like Bash/Fish/etc but more DevOps focused) so if I don’t handle all types of errors then the entire UX falls apart.
- Tobu 5y agoIndeed, first result and no error checking: https://gobyexample.com/hello-world https://gobyexample.com/hello-world
- Thaxll 5y agoBecause fmt and log print are not usually not used for this, if I were to do it properly I would use io.Copy() which everyone check the result. Checking the result of log and print is very tedious and not useful most of the time.