Skip to content

Commit

Permalink
Update Networks docs to mention option
Browse files Browse the repository at this point in the history
  • Loading branch information
oschwald committed Aug 14, 2020
1 parent 8df8e4b commit a1069d8
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions traverse.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,9 @@ func SkipAliasedNetworks(networks *Networks) {
// the database.
//
// Please note that a MaxMind DB may map IPv4 networks into several locations
// in an IPv6 database. This iterator will iterate over all of these
// locations separately.
// in an IPv6 database. This iterator will iterate over all of these locations
// separately. To only iterate over the IPv4 networks once, use the
// SkipAliasedNetworks option.
func (r *Reader) Networks(options ...NetworksOption) *Networks {
var networks *Networks
if r.Metadata.IPVersion == 6 {
Expand All @@ -62,7 +63,8 @@ func (r *Reader) Networks(options ...NetworksOption) *Networks {
//
// Please note that a MaxMind DB may map IPv4 networks into several locations
// in an IPv6 database. This iterator will iterate over all of these locations
// separately.
// separately. To only iterate over the IPv4 networks once, use the
// SkipAliasedNetworks option.
//
// If the provided network is contained within a network in the database, the
// iterator will iterate over exactly one network, the containing network.
Expand Down

0 comments on commit a1069d8

Please sign in to comment.