RSSAmplifier

Alex Edwards · Nov 8, 2023

Demystifying function parameters in Go

0
Sign in to vote or save

This site does not allow itself to be embedded. You can still read it on the original site — the toolbar below keeps your place in the directory.

In this post we're going to talk about how (and why!) different types of function parameters behave differently in Go. If you're new (or even not-so-new) to Go, this can be a common source of confusion and questions. Why do functions generally mutate maps and slices, but not other data types? Why isn't my slice being mutated when I append to it in a function? Why doesn't assigning a new value to a…

Read on alexedwards.net

Comments

Nothing yet. Say the first thing.

    Sign in to join the conversation.