package main import "fmt" type Bean struct { cool bool } func WeCool(beans []Bean) bool { fmt.Println(beans) for _, bean := range beans { if !bean.cool { fmt.Println("Not cool.") return false } } fmt.Println("We cool.") return true } func main() { beans := []Bean{{true}, {false}} WeCool(beans) beans[1].cool = true WeCool(beans) }