Re: [go-nuts] Ignoring errors from os.File.Close

2020-01-12 Thread Ian Lance Taylor
On Sun, Jan 12, 2020 at 9:19 PM Philip Boampong wrote: > > On Mon, Jan 13, 2020 at 3:07 AM Ian Lance Taylor wrote: >> >> The difference between os.Stdout and other files is: if writing to >> os.Stdout fails, where are you going to report the error? You could >> report it to os.Stderr, of course,

Re: [go-nuts] Ignoring errors from os.File.Close

2020-01-12 Thread Philip Boampong
On Mon, Jan 13, 2020 at 3:07 AM Ian Lance Taylor wrote: > The difference between os.Stdout and other files is: if writing to > os.Stdout fails, where are you going to report the error? You could > report it to os.Stderr, of course, but if os.Stdout doesn't work then > it is very likely that os.S

Re: [go-nuts] Ignoring errors from os.File.Close

2020-01-12 Thread Ian Lance Taylor
On Sun, Jan 12, 2020 at 4:39 PM wrote: > > Up until now I've been in the habit of checking Close errors on files written > to, but I never closed os.Stdout after use (for the purpose of error > reporting), and now I'm thinking that's inconsistent. > > In this commit message [1], Ian Lance Taylor

[go-nuts] Ignoring errors from os.File.Close

2020-01-12 Thread pboampong5
Hello, Up until now I've been in the habit of checking Close errors on files written to, but I never closed os.Stdout after use (for the purpose of error reporting), and now I'm thinking that's inconsistent. In this commit message [1], Ian Lance Taylor wrote: "Programs should always check the