找出map字段更新里的bug

来自Map
Go 1.27 进阶 4分钟 找出1处问题

找出rename无法编译的原因。

Go
type Profile struct {
    Name string
}

func rename(profiles map[int]Profile, id int) {
    profiles[id].Name = "Lin"
}
在试验场中打开
报告错误