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/website: Go playground weird error #53661

Closed
alexfrunza opened this issue Jul 2, 2022 · 2 comments
Closed

x/website: Go playground weird error #53661

alexfrunza opened this issue Jul 2, 2022 · 2 comments

Comments

@alexfrunza
Copy link

What is the URL of the page with the issue?

https://go.dev/play/

What is your user agent?

Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Firefox/91.0

Screenshot

1
2

What did you do?

I was reading the Inside the Go Playground - The Go Programming Language blog, and wanted to try an example that was listed there about network. When I tried the example, more often I encountered the error that can be seen in second image, than the actual result that can be seen in the first image.

I'm sorry if it's wrong to report this issue here but I saw no option to report playground issues on the website.

Code that I tested:

package main

import (
	"io"
	"log"
	"net"
	"os"
)

func main() {
	l, err := net.Listen("tcp", "127.0.0.1:4000")
	if err != nil {
		log.Fatal(err)
	}
	defer l.Close()

	go dial()

	c, err := l.Accept()
	if err != nil {
		log.Fatal(err)
	}
	defer c.Close()

	io.Copy(os.Stdout, c)
}

func dial() {
	c, err := net.Dial("tcp", "127.0.0.1:4000")
	if err != nil {
		log.Fatal(err)
	}
	defer c.Close()
	c.Write([]byte("Hello, network\n"))
}
@gopherbot gopherbot added this to the Unreleased milestone Jul 2, 2022
@ZekeLu
Copy link
Contributor

ZekeLu commented Jul 2, 2022

duplicate of #45855?

@seankhliao
Copy link
Member

Duplicate of #48394

@seankhliao seankhliao marked this as a duplicate of #48394 Jul 3, 2022
@seankhliao seankhliao closed this as not planned Won't fix, can't repro, duplicate, stale Jul 3, 2022
@golang golang locked and limited conversation to collaborators Jul 3, 2023
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

4 participants