Repository URL to install this package:
Version:
1.3.7-1 ▾
|
x := 0 if t := false; t { x = 3 } else { x = 5 } println("x:", x) x = 0 switch s := "Hello"; s { default: x = 7 case "world", "hi": x = 5 case "xsw": x = 3 } println("x:", x) v := "Hello" switch { case v == "xsw": x = 3 case v == "Hello", v == "world": x = 9 default: x = 7 } println("x:", x) v = "Hello" switch { case v == "xsw": x = 3 case v == "hi", v == "world": x = 9 default: x = 11 } println("x:", x) switch v { case "Hello": println(v) fallthrough case "hi": println(v) fallthrough default: println(v) } z := 3 switch { case z < 10: println(z) fallthrough case z == 10: println(z) fallthrough case z > 10: println(z) fallthrough default: println(z) }