It looks like you are trying to use (almost) straight up C code here. Go has a few differences.
- First off, you can't initialize arrays and slices as const. The termconsthas a different meaning in Go, as it does in C. The list should be defined asvarinstead.
- Secondly, as a style rule, Go prefers basenameOptsas opposed tobasename_opts.
- There is no chartype in Go. You probably wantbyte(orruneif you intend to allow unicode codepoints).
- The declaration of the list must have the assignment operator in this case. E.g.: var x = foo.
- Go's parser requires that each element in a list declaration ends with a comma.
This includes the last element. The reason for this is because Go automatically inserts
semi-colons where needed. And this requires somewhat stricter syntax in order to work.
For example:
type opt struct {
    shortnm      byte
    longnm, help string
    needArg      bool
}
var basenameOpts = []opt { 
    opt {
        shortnm: 'a', 
        longnm: "multiple", 
        needArg: false, 
        help: "Usage for a",
    },
    opt {
        shortnm: 'b', 
        longnm: "b-option", 
        needArg: false, 
        help: "Usage for b",
    },
}
An alternative is to declare the list with its type and then use an init function to fill it up. This is mostly useful if you intend to use values returned by functions in the data structure. init functions are run when the program is being initialized and are guaranteed to finish before main is executed. You can have multiple init functions in a package, or even in the same source file.
    type opt struct {
        shortnm      byte
        longnm, help string
        needArg      bool
    }
    var basenameOpts []opt
    func init() { 
        basenameOpts = []opt{
            opt {
                shortnm: 'a', 
                longnm: "multiple", 
                needArg: false, 
                help: "Usage for a",
            },
            opt {
                shortnm: 'b', 
                longnm: "b-option", 
                needArg: false, 
               help: "Usage for b",
            },
        }
    }
Since you are new to Go, I strongly recommend reading through the language specification. It is pretty short and very clearly written. It will clear a lot of these little idiosyncrasies up for you.