I came across some code which uses functions like the following:
func main() {
...
X:
...
}
I'm confused as to what this does. Here is an example I created to try and mess around and see what's happening, but I don't completely understand what K
is, is it a closure? A lambda function?
package main
import "fmt"
func main() {
for i:=0; i<10; i++ {
K: for j:=0; j<10; j++{
if i*j == 81 {
fmt.Printf("%v,%v", i, j)
break;
} else {
continue K;
}
}
}
}
I'm very new to Go and functional programming too so I'm trying to understand this notion.