type TestStruct struct {
Id int
Data map[int]interface{}
}
func main() {
testing := map[int]*TestStruct{}
testing[0]= &TestStruct{
Id:0,
}
testing[0].Data= map[int]interface{}{
1:"dd",
}
}
type TestStruct struct {
Id int
Data map[int]interface{}
}
func main() {
testing := map[int]TestStruct{}
testing[0]= TestStruct{
Id:0,
}
testing[0].Data= map[int]interface{}{
1:"dd",
}
}
type TestStruct struct {
Id int
Data map[int]interface{}
}
func main() {
testing := map[int]TestStruct{}
testing[0] = TestStruct{
Id: 0,
}
objCopy := testing[0]
objCopy.Data = map[int]interface{}{
1: "dd",
}
testing[0] = objCopy
}