cannot assign to struct field in map

报错原因是map无法取址,解决办法:使用 *struct


tests := map[string]*struct{
    A string
    B string
} {
    "t1": {}
}

tests["t1"].A = "1"