Go中的结构初始化数组
我是Go的新手。这个问题使我发疯。您如何在Go中初始化结构数组? type opt struct { shortnm char longnm, help string needArg bool } const basename_opts []opt { opt { shortnm: 'a', longnm: "multiple", needArg: false, help: "Usage for a"} }, opt { shortnm: 'b', longnm: "b-option", needArg: false, help: "Usage for b"} } 编译器表示希望;在之后[]opt。 我应该在哪里把大括号{初始化结构数组?