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

x/playground/sandbox: programs that produce no output never 'end' #11903

Closed
malkia opened this issue Jul 28, 2015 · 4 comments
Closed

x/playground/sandbox: programs that produce no output never 'end' #11903

malkia opened this issue Jul 28, 2015 · 4 comments

Comments

@malkia
Copy link

malkia commented Jul 28, 2015

package main

import (
    "fmt"
    "os"
)

func main() {
    fmt.Fprintf(os.Stdin, "hello, writer\n")
}
@malkia
Copy link
Author

malkia commented Jul 28, 2015

Yet this version works just fine:

@malkia
Copy link
Author

malkia commented Jul 28, 2015

package main

import (
    "fmt"
    "os"
)

func main() {
    _, err := fmt.Fprintf(os.Stdin, "hello, writer\n")
    fmt.Println(err)
}

@adg adg changed the title In tour.golang.org, the following code shows that it needs to be killed (the "Kill" button stays active (blue)) x/playground/sandbox: programs that produce no output never 'end' Jul 28, 2015
@adg
Copy link
Contributor

adg commented Jul 28, 2015

It seems that the JS on the client side isn't gracefully handling snippets with no output. I've sent out a fix.

@adg adg self-assigned this Jul 28, 2015
@gopherbot
Copy link

CL https://golang.org/cl/12751 mentions this issue.

@golang golang locked and limited conversation to collaborators Aug 5, 2016
@rsc rsc unassigned adg Jun 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants