Re:Go 1.18
by yencabulator on Tuesday March 22, 2022 @11:19AM
(#30767138)
[ Parent
| on HN ]
Re:Go 1.18
by randomswede on Wednesday March 23, 2022 @05:11AM
(#30776534)
Yes, as I said, if you use a map[T]bool, you need to use something like:
for k, v := range m { if v { } }
But it also allows you to use "if m[key] { ... }". It is literally a trade-off for what convenience you want. And in both cases, you should (probably) wrap an abstraction around the raw map.