I much prefer struct{}. For gophers, it is very expressive of "nothing to see here". This value has no meaning, so don't even bother with it.
And as someone else said, the _, ok pattern is so pervasive, it's no harder for me to read than if myMap[foo] { if _, ok := myMap[foo]; ok { } I think it tells the story better than bool. If you use bool, you're saying "this value could be true or false", when in fact, the value should always be true, or not exist. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.