Method does not change the value of object if the object is in a slice
问题 Here is my program: package main import ( "fmt" ) type Number struct { val int } func (num * Number) Increment () { num.val += 1 } func (num Number) Value() int { return num.val } func main() { numbers := []Number { {val: 12}, {val: 7}, {val: 0}, } for _, each := range numbers { each.Increment() fmt.Println(each.Value()) } for _, each := range numbers { fmt.Println(each.Value()) } } Here is the output: 13 8 1 12 7 0 First question: why does the Increment() method not update the value in the