> > On Wednesday, March 20, 2019 at 1:44:23 AM UTC-4, Shulhan wrote:
Any Close on file or connection should be called only if only the > call to Open function or method success. > > You have two options here: either you remove the panic when Close is > error (only logging it) or call Close only if Open is success. I > usually prefer the latter. > > -- > { "github":"github.com/shuLhan", "site":"kilabit.info" } > You and I agree: my code snippit will panic if the open fails, or if (the open suceeds && the close fails) --dave -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.