Passing a map to a function

In Golang, when a map is passed to a function, only the wrapper (i.e. header) is passed while the underlying data is not.  This is a very efficient method which does not require any complex references or pointers and makes for a very compact and pretty language.

Run the demo at the Go Playground

Leave a Reply

Your email address will not be published. Required fields are marked *