先看代码 Go Playground package main import ( "fmt" ) type bug struct { name string cause string } func main() { bugNames := []string{"an", "interesting", "bug"} var bugs []*bug bugObj := &bug{ cause: "sth", } for idx, bn := range bugNames { bugs = append(bugs, bugObj) bugs[idx].name = bn } for _, b := range bugs { fmt.Printf("bug:%v", *b) } } 其实,不难看