1// run 2 3// Copyright 2021 The Go Authors. All rights reserved. 4// Use of this source code is governed by a BSD-style 5// license that can be found in the LICENSE file. 6 7package main 8 9func f(j int) { 10loop: 11 switch j { 12 case 1: 13 break loop 14 default: 15 println(j) 16 } 17} 18 19func main() { 20loop: 21 for j := 0; j < 5; j++ { 22 f(j) 23 if j == 3 { 24 break loop 25 } 26 } 27} 28