Is golang map lookup by value or by reference?
<p>When I retrieve a struct from a map in Go, do I get a copy of the value?  Or do I get the actual value that's in the map?</p>

<p>For example, let's say I have a map from strings to structs:</p>

<pre><code>type quality struct {
    goodness    int
    crunchiness int 
}
cookies := make(map[string]quality)
cookies["nutrageous"] = quality{goodness: 3, crunchiness: 10}
</code></pre>

<p>and I want to modify an entry.</p>

<p>Can I count on the returned value being the same as what's in the map?</p>

<pre><code>c := cookies["nutrageous"]
c.goodness += 5
</code></pre>

<p>Or do I also have to go back and modify what's in the map?</p>

<pre><code>c := cookies["nutrageous"]
c.goodness += 5
cookies["nutrageous"] = c
</code></pre>