|
|
|
|
|
by SleekoNiko
776 days ago
|
|
Forgive me as I'm not experienced in Go. I had a look at the API reference for encoding/json[1] and performed a (very hasty) search on the source code[2]. The API reference doesn't state that panics are a part of the expected error interface, and the source code references seem to be using panics as a way to validate invariants. Is that what you're referring to? I'm not entirely sure if the panics are _just_ for sanity, or if input truly can cause a panic. If it's the latter, then I agree - yikes. [1] - https://pkg.go.dev/encoding/json [2] - https://cs.opensource.google/search?q=panic&sq=&ss=go%2Fgo:s... |
|