package main
import "fmt"
type Item struct{ Qty int }
func main() {
items := []Item{{1}, {2}, {3}}
// the range value is a copy; use the index to write back
for i := range items {
items[i].Qty *= 10
}
fmt.Println(items)
}index to mutate elements in place