iafan / goplayspace

Advanced Go Playground frontend written in Go, with syntax highlighting, turtle graphics mode, and more
https://goplay.space
Other
981 stars 63 forks source link

Output inconsistent with playground, for an infinite loop #30

Open therealplato opened 5 years ago

therealplato commented 5 years ago

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
...