Skip to content

net: SplitHostPort errors if no port is specified, but not if input ends with a trailing ":" #25874

@dfawley

Description

@dfawley

Please answer these questions before submitting your issue. Thanks!

What version of Go are you using (go version)?

All

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)?

All

What did you do?

Repro case:
https://play.golang.org/p/etsLIZv_Oz8

What did you expect to see?

An error due to improper "host:port" syntax.

What did you see instead?

An empty port in the result and no error.

Metadata

Metadata

Assignees

No one assigned

    Labels

    NeedsInvestigationSomeone must examine and confirm this is a valid issue and not a duplicate of an existing one.

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions