that's true, in general. This usage is kinda different than in a normal production code because it's in tests. I changed the decision anyway a few months later but for a different reason - it was God damn hard to get the full stack trace when something goes wrong. This limitation was a huge deal when I tried to improve the debuggability of those tests. Right now, you can use just t.Error instead.
In Go, panic should be reserved for situations where the error is unrecoverable and it doesn't make sense for normal execution to continue.
That's right! That's why the test fails and another test can continue.
that's true, in general. This usage is kinda different than in a normal production code because it's in tests. I changed the decision anyway a few months later but for a different reason - it was God damn hard to get the full stack trace when something goes wrong. This limitation was a huge deal when I tried to improve the debuggability of those tests. Right now, you can use just t.Error instead.