I have a simple function which tests whether a string is an integer
func testInt(str string, m map[bool]) int {
_,e := strconv.ParseInt(str, 0, 64);
return m[nil == e] * 7;
}
where the map being passed contains m[true] = 1
, m[false] = 0
. However, when I attempt to run this Go complains
1: syntax error: unexpected )
Either I cannot pass maps around as parameters in this way or else I am doing this entirely wrong. In any case, I would much appreciate some help