I have a simple function that checks if 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 transmitted mapping contains m[true] = 1 , m[false] = 0 . However, when I try to run this Go, it complains
1: syntax error: unexpected )
Or I canβt pass cards as parameters in this way, otherwise Iβm doing it completely wrong. In any case, I would really appreciate help
source share