You can't really use panics as exceptions. If you do your code will be strange and hard to work with. This strangeness is fine, because they aren't meant to be used like that.
A good rule of thumb is to use panics when it's a programmer error indicating a bug.
Comments
> that's what you get when you don't support exceptions.
That's what you get when you refuse to use them anyway.
Go has exceptions, there's just a dogma about never using them.
You can't really use panics as exceptions. If you do your code will be strange and hard to work with. This strangeness is fine, because they aren't meant to be used like that.
A good rule of thumb is to use panics when it's a programmer error indicating a bug.
Not dogma, just common sense based on experience.
Panic() is for truly irrecoverable exceptional situations where you do not expect the caller to catch it.