package main

import "fmt"

func main() {
	// section: code
	type Beatle struct {
		Name       string
		Instrument string
	}

	beatles := make(map[string]Beatle)

	b := Beatle{Name: "Paul", Instrument: "bass"}
	beatles[b.Name] = b
	// change the value after being inserted into the map
	b.Instrument = "foo"

	fmt.Println("variable:", b)

	// retrieve the value from the map
	lookup := beatles["Paul"]
	fmt.Println("lookup:", lookup)
	// section: code
}

/*
// section: output
variable: {Paul foo}
lookup: {Paul bass}
// section: output

*/
