golang/go
View on GitHubnet: Resolver.LookupIP: document should clarify the return values
Open
#43,506 opened on Jan 5, 2021
DocumentationNeedsFixhelp wanted
Repository metrics
- Stars
- (133,883 stars)
- PR merge metrics
- (No merged PRs in 30d)
Description
The current document on net.Resolver.LookupIP was not clear on the return values (i.e. what to expect when err is nil).
Looking into the source code, LookupIP uses internetAddrList here, and the comment for internetAddrList here does state the slice would contain at least one IP when err is nil.
We should duplicate the comment of internetAddrList to LookupIP.