goplayspace icon indicating copy to clipboard operation
goplayspace copied to clipboard

Output inconsistent with playground, for an infinite loop

Open therealplato opened this issue 6 years ago • 0 comments

Source:

package main

import (
	"fmt"
	"log"
)

func main() {
	c := make(chan struct{})
main:
	for {
		select {
		case <-c:
			break main
		default:
			break
		}
		log.Println("below select")
	}
	fmt.Println("Documentation is for users.")
}

https://goplay.space/#n_Dw6DNrWCX output:

invalid character 'F' looking for beginning of value

https://play.golang.org/p/n_Dw6DNrWCX output:

2009/11/10 23:00:00 below select
2009/11/10 23:00:00 below select
...

therealplato avatar Oct 29 '18 21:10 therealplato