找出 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"
}
在试验场中打开
报告错误