panic

  1. assignment to entry in nil map 尝试向一个未初始化的 map 中赋值。在 Go 语言中,map 是引用类型,必须在使用前通过 make 或字面量初始化,否则它的值为 nil,此时尝试向 nilmap 中插入数据会导致运行时 panic。