Why do you Prepare a statement if you don't reuse it? Just use a db.Exec.

But concretes aside: error handling IS important!
But if such code bothers you, create some helper type / function: see one 
Andy+Brad pair programming video where they create an errWriter struct which is 
an io.Writer, and just writes to the underlyin Write. Untill the first error. 
From then on it always returns the fist error.

This way all the w.Write, Fprintf... calls can skip the error handling, only 
the last is needed to be checked.

But this involves that you know which are the block that can postpone error 
handling, and which has to be more strict.

-- 
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.

Reply via email to