I am calling a function that returns an empty array if there are no values.
When I do this it doesn't work:
if r == [] { fmt.Println("No return value") } The work around I'm using is:
var a [0]int if r == a { fmt.Println("No return value") } But declaring a variable just to check the return value doesn't seem right. What's the better way to do this?
ris also of type[0]intbut in that case the two (empty) arrays would always compare equal.