Hi all,
Wondering if the 'expression' part of an if-statement should be in one line only, given the following case, 'go tool compile' will report a syntax error
Enter code here...
package p
func cf1() int {
return 0
}
func cf2() int {
return 10
}
func f() {
if cf2() - 1
< cf1() {
println("tested")
}
}
ss.go:13:3: syntax error: unexpected <, expecting expression
Guess there might be syntax specification rules but I failed to find out.
Thanks a lot.