Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Output inconsistent with playground, for an infinite loop #30

Open
therealplato opened this issue Oct 29, 2018 · 0 comments
Open

Output inconsistent with playground, for an infinite loop #30

therealplato opened this issue Oct 29, 2018 · 0 comments

Comments

@therealplato
Copy link

therealplato commented Oct 29, 2018

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
...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant