Why Nostr? What is Njump?
2023-12-12 16:58:41
in reply to

Louis on Nostr: npub1s2kql…p8cla You fell into the popular Go trap, in that you essentially assign ...

You fell into the popular Go trap, in that you essentially assign only the last of the newTask assignments into your map, so all tasks are effectively the same one task.

That issue is so popular that the Go designers are planning changes to the language:

https://github.com/golang/go/discussions/56010

Just do a nt := newTask() inside the loop and omit the declaration in line 83.

Does that solve your issue?

Author Public Key
npub1tp9e9qhmc02khh3jzpn8vmqwhj3u25yw352ed2x87zs4e2ps2uwqhadzfn