Skip to content

Commit dfc02ff

Browse files
committed
Document NetworksWithin()
1 parent 5797a3f commit dfc02ff

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

traverse.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,12 @@ func (r *Reader) Networks() *Networks {
3939
return networks
4040
}
4141

42+
// NetworksWithin returns an iterator that can be used to traverse all networks
43+
// in the database which are contained in a given network.
44+
//
45+
// Please note that a MaxMind DB may map IPv4 networks into several locations
46+
// in an IPv6 database. This iterator will iterate over all of these
47+
// locations separately.
4248
func (r *Reader) NetworksWithin(network *net.IPNet) *Networks {
4349
ip := network.IP
4450
prefixLength, _ := network.Mask.Size()

0 commit comments

Comments
 (0)