Write Go like a senior engineer

https://levelup.gitconnected.com/write-go-like-a-senior-engineer-eee7f03a1883?gi=bcbd0d246c02

9 points · 1 comments · view on lemmy.world

1 Comments

glish@localghost.org · 4 pts · 3y

Go is exclusively pass-by-value. That means each function receives a copy of the value of what you passed in. No exceptions.

Except there are several exceptions... Maps are always pass by reference, even if you don't explicitly pass them as a pointer. Same with slices, channels, and interfaces. Good article otherwise though.