The kubernetes ecosystem has a lot of go code which consequentially suffer from nil panics. Thankfully they recover otherwise we'd see an absolute shit ton of pod restarts.
In general, please stop panicking in library Go and Rust code. It's rude.
Yes! This is one of the tiny few things I don‘t like about rust. In a language so focused on safety, why can anything panic? Every single failable function should return result. No ifs or buts.
nil panics are hard bugs, not stylistic concerns. There is never an occasion where correct code dereferences a nil pointer.
The style point that people are missing here is that every type should have a usable zero value. If (&SomeStruct{}).Method() panics, that's an API design flaw.
In general, please stop panicking in library Go and Rust code. It's rude.