3 ms·
It would be a lot more than 4 lines in Go though. Either the struct definition, or a lot of `if !ok return error`. Especially once the nesting gets deeper.
by tgsovlerkhgsel 5y ago
It would be a lot more than 4 lines in Go though. Either the struct definition, or a lot of `if !ok return error`. Especially once the nesting gets deeper.
- tptacek 5y agoI'm pretty sure it would just be an `if err != nil {http.Error(w, err.Error(), 501); return }`.
- tgsovlerkhgsel 5y agoone of these for each nesting level.