delve/_fixtures/testnextprog.go

41 lines
410 B
Go
Raw Normal View History

package main
import (
"fmt"
"time"
)
func sleepytime() {
2014-09-20 00:58:16 +00:00
time.Sleep(time.Nanosecond)
}
func helloworld() {
fmt.Println("Hello, World!")
}
func testnext() {
2014-10-04 02:44:43 +00:00
var (
j = 1
f = 2
)
for i := 0; i <= 1; i++ {
j += j * (j ^ 3) / 100
helloworld()
}
2014-10-04 02:44:43 +00:00
if f == 1 {
fmt.Println("should never get here")
}
helloworld()
}
func main() {
2014-09-20 00:58:16 +00:00
for i := 0; i <= 1; i++ {
sleepytime()
testnext()
}
}