by cmccabe · 13y ago · 0 comments
People usually don't check the return code of fmt.Printf because they simply don't care. Most of the time, you're just logging to a terminal, which basically never fails. And if logging did fail, you wouldn't want to abort the program because of it.
The only time you might want to check the return value of printf is if you're writing a simple utility designed to transform something passed on stdin to something on stdout.