News for hackers. Stuff that matters.
Re:Fixing for Loops in Go 1.22 by kiitos on Saturday September 23, 2023 @09:44AM (#37623154)

    if display := data["Display"]; display == nil || reflect.ValueOf(display).IsNil() {
        <code>
I mean, even ignoring all of the interface{} design errors, the simple fix here is just

    if _, ok := data["Display"]; !ok {
        <code>

There are no comments on this comment yet.