I'm Brett Slatkin and this is where I write about programming and related topics. You can contact me here or view my projects.

27 December 2012

Another one I see a lot:

"Every statement is if/panic"
if _, err = dataFile.Seek(0, 0); err != nil {
  panic(err)
}
if err = dataFile.Truncate(0); err != nil {
  panic(err)
}
if err = json.NewEncoder(dataFile).Encode(teachMap); err != nil {
  panic(err)
}
© 2009-2024 Brett Slatkin