Skip to content

Commit

Permalink
Add comment
Browse files Browse the repository at this point in the history
  • Loading branch information
Fangliding authored Aug 3, 2024
1 parent eff07ff commit a2d6477
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions common/net/address.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,11 @@ func IPAddress(ip []byte) Address {
}

// DomainAddress creates an Address with given domain.
// This is an internal function that forcibly converts a string to domain.
// It's typically used in test files and mux.
// Unless you have a specific reason, use net.ParseAddress instead,
// as this function does not check whether the input is an IP address.
// Otherwise, you will get strange results like domain: 1.1.1.1
func DomainAddress(domain string) Address {
return domainAddress(domain)
}
Expand Down

0 comments on commit a2d6477

Please sign in to comment.