Skip to content

net: error message for ListenIP is confusing #36436

@perillo

Description

@perillo

net.ListenIP

The documentation of net.ListenIP says:

The network must be an IP network name; see func Dial for details.

However using one of the documented IP network names (like "ip" or "ip4") causes the function to return an error on Linux; e.g. unknown network ip.

According to #7439:

The first argument of ListenIP should be "network"+":"+"protocol on top of the IPv4 or
IPv6".

I confirmed that this works on Linux, but the function is clearly not documented correctly. From #7439 I assume that the format of network is platform dependant.

net.DialIP

The documentation of the network parameter of net.DialIP has the same problem as in net.ListenIP.

Metadata

Metadata

Assignees

No one assigned

    Labels

    DocumentationIssues describing a change to documentation.NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions