On Tue, 2023-03-14 at 19:56 -0700, Kurtis Rader wrote: > Maps are a special-case. You can't pass them "by value" in the sense > you mean because a "map" value is a very tiny structure that contains > a pointer to the actual map.
The passed value is a pointer to the header, otherwise changes to maps would require the altered map to be returned as with slices and append. https://go.dev/play/p/avBBkNwVZRY -- 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/4af2d37285e3b6d2a7594342c18f5c4160b7b86f.camel%40kortschak.io.