转到:多个键可映射到单个值

Is it possible to include an OR operator in the key of a map? Eg.

Go:

var a = map[string]int{
    "A1"|| "B1": 1,
    "A2": 2,
}

Error:

invalid operation: "A1" || "B1" (operator || not defined on string)

No, you cannot. The grammar is defined at http://golang.org/ref/spec#Composite_literals and does not include this feature. You will have to specify each key distinctly.