Posted on 16th September 2024|74 views
How do you init array of structs in Go?
Posted on 16th September 2024| views
Try this example
Var opts = [] struct
{
shortnm bytes
longnm, help string
needArg bool
}{
{'x', "multiple", "Usage for a", false},
{ shortnm: 'y',
longnm: "y-option",
needArg: false,
help: "Use of y", }, }