Labels let you name loops for targeted break or continue:
outer:
for i := 0; i < 3; i++ {
for j := 0; j < 3; j++ {
if i == 1 && j == 1 {
break outer
}
}
}
Without the label, break would only exit the inner loop. With break outer, it exits both loops at once. Labels end with a colon and appear right before the loop.