On Tuesday, 15 March 2022 at 15:51:46 UTC Jan Mercl wrote: > a struct with a single field is another interesting case that can be > abstracted out.
Aside: a struct with *no* fields is also more useful than you might think - e.g. to use a map as a sparse set. m := make(map[int]struct{}) m[123] = struct{}{} -- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/1619071b-4ae7-4ca5-85c3-8573978f5a34n%40googlegroups.com.