22 lines
421 B
Go
22 lines
421 B
Go
package main
|
|
|
|
import "fmt"
|
|
|
|
func main() {
|
|
outer := 19
|
|
_ = outer
|
|
people := [5]string{"Helen", "Mark", "Brenda", "Antonio", "Michael"}
|
|
friends := [2]string{"Mark", "Marry"}
|
|
|
|
outer:
|
|
for index, name := range people {
|
|
for _, friend := range friends {
|
|
if name == friend {
|
|
fmt.Printf("Found a friend %q at index %d\n", friend, index)
|
|
break outer
|
|
}
|
|
}
|
|
}
|
|
fmt.Println("Next instruction after the break")
|
|
}
|