Brad Fitzpatrick
1a963342c7
util/set: add Of variant of SetOf that takes variadic parameter
...
set.Of(1, 2, 3) is prettier than set.SetOf([]int{1, 2, 3}).
I was going to change the signature of SetOf but then I noticed its
name has stutter anyway, so I kept it for compatibility. People can
prefer to use set.Of for new code or slowly migrate.
Also add a lazy Make method, which I often find myself wanting,
without having to resort to uglier mak.Set(&set, k, struct{}{}).
Updates #cleanup
Change-Id: Ic6f3870115334efcbd65e79c437de2ad3edb7625
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2024-05-05 21:14:28 -07:00
..
2024-02-27 23:03:49 -05:00
2023-01-27 15:36:29 -08:00
2023-04-05 17:21:16 -07:00
2024-02-10 14:36:20 -05:00
2024-03-05 16:57:04 +00:00
2024-04-16 15:32:38 -07:00
2024-04-16 15:32:38 -07:00
2024-02-08 17:34:22 -08:00
2024-04-16 15:32:38 -07:00
2023-03-04 12:24:55 -08:00
2024-04-16 15:32:38 -07:00
2024-01-18 12:08:13 -08:00
2024-04-16 15:32:38 -07:00
2024-04-16 15:32:38 -07:00
2023-06-23 12:50:45 -07:00
2023-11-01 19:23:16 -07:00
2024-04-16 15:32:38 -07:00
2023-10-13 15:38:22 -07:00
2023-11-22 12:09:59 -05:00
2024-04-16 15:32:38 -07:00
2024-04-16 15:32:38 -07:00
2023-01-27 15:36:29 -08:00
2024-04-23 21:08:18 +01:00
2024-04-16 15:32:38 -07:00
2023-04-17 18:38:24 -04:00
2024-04-16 15:32:38 -07:00
2023-01-27 15:36:29 -08:00
2024-04-16 15:32:38 -07:00
2024-04-22 16:45:01 -07:00
2023-01-27 15:36:29 -08:00
2024-04-23 08:54:17 -05:00
2024-04-16 15:32:38 -07:00
2023-01-27 15:36:29 -08:00
2024-03-27 08:53:52 -05:00
2023-01-27 15:36:29 -08:00
2024-04-16 15:32:38 -07:00
2023-01-27 15:36:29 -08:00
2024-02-09 15:19:27 -08:00
2024-03-20 18:23:54 -04:00
2024-04-16 15:32:38 -07:00
2024-05-05 21:14:28 -07:00
2024-04-16 15:32:38 -07:00
2024-04-30 16:47:21 -07:00
2024-04-23 22:23:48 -07:00
2023-04-03 17:14:14 -04:00
2023-01-27 15:36:29 -08:00
2023-08-08 19:51:44 -06:00
2024-04-16 15:32:38 -07:00
2024-04-04 14:38:16 -07:00
2024-04-16 15:32:38 -07:00
2023-02-01 14:39:13 -08:00
2024-04-23 22:23:48 -07:00
2024-04-16 15:32:38 -07:00