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: implement ResolveIPAddr with a stub for lookupProtocol #24

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

paralin
Copy link
Contributor

@paralin paralin commented Apr 8, 2024

No description provided.

Signed-off-by: Christian Stewart <christian@aperture.us>
@paralin
Copy link
Contributor Author

paralin commented Apr 8, 2024

Okay, after a couple fixes, got it right now 👍🏽

Copy link
Contributor

@scottfeldman scottfeldman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the PR. Some inline comments...

// See func [Dial] for a description of the network and address
// parameters.
func ResolveIPAddr(network, address string) (*IPAddr, error) {
if network == "" { // a hint wildcard for Go 1.0 undocumented behavior
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can probably skip everything here except returning the "not implemented" error.

default:
return nil, UnknownNetworkError(network)
}
return nil, errors.New("tcpsock:ResolveIPAddr not implemented")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/tcpsock/ipsock

//
// See func [Dial] for a description of the network and address
// parameters.
func ResolveIPAddr(network, address string) (*IPAddr, error) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move this func to iprawsock.go please. I'm trying to keep things aligned with where things are in the upstream src/net repo, for comparison sake.

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

Successfully merging this pull request may close these issues.

2 participants