Skip to content

Commit

Permalink
godoc correction
Browse files Browse the repository at this point in the history
  • Loading branch information
Sean Foley committed Aug 19, 2024
1 parent d0bf168 commit 792f41f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions ipaddr/ipaddr.go
Original file line number Diff line number Diff line change
Expand Up @@ -1965,20 +1965,24 @@ func (addr *IPAddress) MergeToPrefixBlocks(addrs ...*IPAddress) []*IPAddress {
}

// MergeToPrefixBlocks merges the given set of IP addresses and subnets into a minimal number of prefix blocks.
//
// This function complements the MergeToPrefixBlock methods of each IP address type, whether IPv4Address, IPv6Address, or IPAddress.
// Those methods ignore arguments that do not match the IP version of the method receiver, while this function does not.
// This function will only ignore an argument if it is nil, or it is the zero-bit zero value of the type IPAddress.
// All other arguments will have IP version IPv4 or IPv6, and will be merged into one of the two returned slices.
//
// Use ToIPv4Slice or ToIPv6Slice if you wish to convert the returned slices to the more specific types []*IPv4Address or []*IPv6Address.
func MergeToPrefixBlocks(addrs ...*IPAddress) (ipv4Blocks, ipv6Blocks []*IPAddress) {
return mergeToBlocks((*IPAddress).MergeToPrefixBlocks, addrs)
}

// MergeToPrefixBlocks merges the given set of IP addresses and subnets into a minimal number of prefix blocks.
// This function complements the MergeToPrefixBlock methods of the IP address types, whether IPv4Address, IPv6Address, or IPAddress.
// MergeToSequentialBlocks merges the given set of IP addresses and subnets into a minimal number of sequential blocks.
//
// This function complements the MergeToSequentialBlocks methods of the IP address types, whether IPv4Address, IPv6Address, or IPAddress.
// Those methods ignore arguments that do not match the IP version of the method receiver, while this function does not.
// This function will only ignore an argument if it is the zero-bit zero value of the type IPAddress.
// All other arguments will have IP version IPv4 or IPv6, and will be merged into one of the two returned slices.
//
// Use ToIPv4Slice or ToIPv6Slice if you wish to convert the returned slices to the more specific types []*IPv4Address or []*IPv6Address.
func MergeToSequentialBlocks(addrs ...*IPAddress) (ipv4Blocks, ipv6Blocks []*IPAddress) {
return mergeToBlocks((*IPAddress).MergeToSequentialBlocks, addrs)
Expand Down

0 comments on commit 792f41f

Please sign in to comment.