I have a function named test
which is inside the main func.
//stuff
func main() {
var test = func() {
if (/*some condition from main*/) {
return test()
}
}
val := test()
}
When i run this it says:
undefined: test
and it is referencing the return test()
inside the test func.
How can i fix this?