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

net: ErrClosed should implement Error #45357

Closed
josharian opened this issue Apr 2, 2021 · 3 comments
Closed

net: ErrClosed should implement Error #45357

josharian opened this issue Apr 2, 2021 · 3 comments
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Milestone

Comments

@josharian
Copy link
Contributor

package main

import (
	"fmt"
	"net"
)

func main() {
	err := net.ErrClosed
	_, ok := err.(net.Error)
	fmt.Println(ok)
}

This prints false. I think it should print true, and that both Temporary and Timeout should return false.

@josharian josharian added the NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. label Apr 2, 2021
@josharian
Copy link
Contributor Author

cc @bradfitz @ianlancetaylor for a decision

@ianlancetaylor
Copy link
Member

SGTM. Sent a CL.

@gopherbot
Copy link
Contributor

Change https://golang.org/cl/307030 mentions this issue: net: make ErrClosed and ParseError implement net.Error

@odeke-em odeke-em added this to the Go1.17 milestone Apr 3, 2021
@odeke-em odeke-em added NeedsFix The path to resolution is known, but the work has not been done. and removed NeedsDecision Feedback is required from experts, contributors, and/or the community before a change can be made. labels Apr 3, 2021
@rsc rsc mentioned this issue Jun 10, 2021
83 tasks
@golang golang locked and limited conversation to collaborators Apr 5, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsFix The path to resolution is known, but the work has not been done.
Projects
None yet
Development

No branches or pull requests

4 participants