Infinite loop in Golang

If you skip the condition in the for loop, you get an infinite loop.

sum := 0
for {
    sum++ // repeated forever
}
fmt.Println(sum) // never reached
for without a condition will loop repeatedly until you break out of the loop or return from the enclosing function.