delve/_fixtures/testvisitorprog.go
Derek Parker 86e1530524 Improve next implementation
* Better tracking of current goroutine
* More efficient, eliminates superfluous step syscalls
* Handles concurrency and thread coordination better
2015-03-31 17:12:45 -05:00

60 lines
688 B
Go

package main
import "fmt"
func main() {
for {
for i := 0; i < 5; i++ {
if i == 0 {
fmt.Println("it is zero!")
} else if i == 1 {
fmt.Println("it is one")
} else {
fmt.Println("wat")
}
switch i {
case 3:
fmt.Println("three")
case 4:
fmt.Println("four")
}
}
fmt.Println("done")
}
{
fmt.Println("useless line")
}
fmt.Println("end")
}
func noop() {
var (
i = 1
j = 2
)
if j == 3 {
fmt.Println(i)
}
fmt.Println(j)
}
func looptest() {
for {
fmt.Println("wat")
if false {
fmt.Println("uh, wat")
break
}
}
fmt.Println("dun")
}
func endlesslooptest() {
for {
fmt.Println("foo")
fmt.Println("foo")
}
}