Skip to content

Commit a1069d8

Browse files
committed
Update Networks docs to mention option
1 parent 8df8e4b commit a1069d8

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

traverse.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,9 @@ func SkipAliasedNetworks(networks *Networks) {
4444
// the database.
4545
//
4646
// Please note that a MaxMind DB may map IPv4 networks into several locations
47-
// in an IPv6 database. This iterator will iterate over all of these
48-
// locations separately.
47+
// in an IPv6 database. This iterator will iterate over all of these locations
48+
// separately. To only iterate over the IPv4 networks once, use the
49+
// SkipAliasedNetworks option.
4950
func (r *Reader) Networks(options ...NetworksOption) *Networks {
5051
var networks *Networks
5152
if r.Metadata.IPVersion == 6 {
@@ -62,7 +63,8 @@ func (r *Reader) Networks(options ...NetworksOption) *Networks {
6263
//
6364
// Please note that a MaxMind DB may map IPv4 networks into several locations
6465
// in an IPv6 database. This iterator will iterate over all of these locations
65-
// separately.
66+
// separately. To only iterate over the IPv4 networks once, use the
67+
// SkipAliasedNetworks option.
6668
//
6769
// If the provided network is contained within a network in the database, the
6870
// iterator will iterate over exactly one network, the containing network.

0 commit comments

Comments
 (0)