I use it in main() in short scripts to handle errors when I don't expect them to ever occur. It's just a shortcut for log.Error followed by panic. Similar to log.Fatal.
I cannot seem to think of many situations where log.Panic is very useful. Can someone provide a quick example?
--
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...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.