github.com/nibnait/go-learn@v0.0.0-20220227013611-dfa47ea6d2da/src/test/chapter/ch1/05_loop_test.go (about) 1 package ch1 2 3 import "testing" 4 5 func TestWhileLoop(t *testing.T) { 6 n := 0 7 8 // while (n < 5) 9 for n < 5 { 10 t.Log(n) 11 n++ 12 } 13 }