3 ms·
There are usually two choices with non-nil errs: log.Printf("WARNING: something bad happened (nonfatal): %v\n", err) or: log.Fatalf("FATAL ERROR: %v\n",
by bkeroack 12y ago
There are usually two choices with non-nil errs:
log.Printf("WARNING: something bad happened (nonfatal): %v\n", err)
or:
log.Fatalf("FATAL ERROR: %v\n", err)
or maybe:
// pass the buck
return err
That's it.