delve/_fixtures/loopprog.go
Derek Parker 4d1dc5ad0e Inject SIGTRAP for manual stop
Instead of fighting against the normal flow, just signal a SIGTRAP and
let the existing flow handle it, as long as we set the halt flag
correctly the system should halt.
2015-07-07 15:55:22 -05:00

20 lines
182 B
Go

package main
import "fmt"
func loop() {
i := 0
for {
i++
if (i % 100000) == 0 {
fmt.Println(i)
}
}
fmt.Println(i)
}
func main() {
fmt.Println("past main")
loop()
}