File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -63,12 +63,12 @@ func ExampleReader_Networks() {
6363 }
6464 defer db .Close ()
6565
66- record := struct {
67- Domain string `maxminddb:"connection_type"`
68- }{}
69-
7066 networks := db .Networks (maxminddb .SkipAliasedNetworks )
7167 for networks .Next () {
68+ record := struct {
69+ Domain string `maxminddb:"connection_type"`
70+ }{}
71+
7272 subnet , err := networks .Network (& record )
7373 if err != nil {
7474 log .Panic (err )
@@ -114,17 +114,17 @@ func ExampleReader_NetworksWithin() {
114114 }
115115 defer db .Close ()
116116
117- record := struct {
118- Domain string `maxminddb:"connection_type"`
119- }{}
120-
121117 _ , network , err := net .ParseCIDR ("1.0.0.0/8" )
122118 if err != nil {
123119 log .Panic (err )
124120 }
125121
126122 networks := db .NetworksWithin (network , maxminddb .SkipAliasedNetworks )
127123 for networks .Next () {
124+ record := struct {
125+ Domain string `maxminddb:"connection_type"`
126+ }{}
127+
128128 subnet , err := networks .Network (& record )
129129 if err != nil {
130130 log .Panic (err )
You can’t perform that action at this time.
0 commit comments