func test(args ...string) {
var msg map[string] interface{}
i := 0
msg[\"product\"] = args[i++]
msg[\"key\"] = args[i++]
msg[\"signature\"] = args
According to Language Specification, http://golang.org/ref/spec#IncDec_statements, i++ is a IncDec statements
, which is a statement
, but not a expression
.As for args[index]
, index must be a expression
. You want more details , just read it Go Language Specification, it's just what the language demand.