Is it possible in Go create array with where each element of array will be array of slices or structures.
Something like in PHP
$a = [1=>"test", 2=>""]
// in this example 2 is integer will be for GoLang?
$a[2] = [ object, object, object ]
Can I do in Go something like ? I know about incorrect syntax.
var a [int][]StructureName
b := make([]StructureName, 0)
b := append ( b, StructureName{a, b, c, d})
b := append ( b, StructureName{e, f, g, h})
a[0] = append (a[0][0], b)
`/*
[
1 => [
‘username1’, <-- string element
‘events’=>[ <-- array of structures
object1, <-- structure
object2, <-- structure
object3 <-- structure
]
],
2 => [ <-- next record
‘username2’,
‘events’=>[
object1,
object2,
object3
]
]
]
*/
`