Comment

Comment by assbuttbuttass

    for _, informer := range c.informerMap {
        informer := informer
        go informer.Run(stopCh)
    }

    for _, a := range alarms {
        a := a
        go a.Monitor(b)
    }

Not sure what the difference could be, but let me take a guess. In one case, the loop variable is a pointer, and in the other case a value. The method call uses a pointer receiver, so in the value case the compiler automatically inserts a reference to the receiver?

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton