Skip to content

Instantly share code, notes, and snippets.

View feyeleanor's full-sized avatar

Eleanor McHugh feyeleanor

View GitHub Profile
@feyeleanor
feyeleanor / map_immutability.go
Created December 17, 2015 15:12
Example showing difference between storing struct and *struct in a string
package main
import "fmt"
type S struct {
I int
}
func main() {
m1 := map[string]S{"0": S{0}, "1": S{1}}