Skip to content

net: Resolver.LookupSRV first result param not documented well #49982

Closed

Description

@bradfitz

https://pkg.go.dev/net#Resolver.LookupSRV has signature:

func (r *Resolver) LookupSRV(ctx context.Context, service, proto, name string) (string, []*SRV, error)

... but the docs don't make it super clear what that string result is.

There's a hint in the docs:

LookupSRV constructs the DNS name to look up following RFC 2782. That is, it looks up _service._proto.name.

But that makes it sound like it's an implementation detail, not that the first result is indeed that DNS name.

Activity

  1. added this to the Backlog milestone on Dec 5, 2021
  2. gopherbot commented on Dec 6, 2021

    @gopherbot
    Contributor

    Change https://golang.org/cl/369554 mentions this issue: net: fix typo in comment

  3. added a commit that references this issue on Feb 6, 2026
    a8dd728
  4. gopherbot commented on Feb 6, 2026

    @gopherbot
    Contributor

    Change https://go.dev/cl/742660 mentions this issue: net: document LookupSRV cname return value

  5. added a commit that references this issue on Feb 9, 2026
    9c756d4
  6. gopherbot commented on Feb 9, 2026

    @gopherbot
    Contributor

    Change https://go.dev/cl/743161 mentions this issue: net: document LookupSRV cname return value

  7. added a commit that references this issue on Apr 8, 2026
    7c5ab41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    DocumentationIssues describing a change to documentation.NeedsFixThe path to resolution is known, but the work has not been done.help wanted

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions