@@ -12,8 +12,11 @@ import (
12
12
)
13
13
14
14
const (
15
- cdirIE = "127.0.100.100/24"
16
- cidrUS = "127.0.200.200/24"
15
+ cdirIE127 = "127.0.100.100/24"
16
+ cidrIE10 = "10.89.100.100/24"
17
+
18
+ cidrUS127 = "127.0.200.200/24"
19
+ cidrUS10 = "10.89.200.200/24"
17
20
)
18
21
19
22
// Create new mmdb database fixtures in this directory.
@@ -32,13 +35,20 @@ func createCityDB(dbName, dbType string) {
32
35
}
33
36
34
37
// Define and insert the new data.
35
- _, ipIE, err := net.ParseCIDR(cdirIE)
38
+ _, ipIE127, err := net.ParseCIDR(cdirIE127)
39
+ if err != nil {
40
+ log.Fatal(err)
41
+ }
42
+ _, ipIE10, err := net.ParseCIDR(cidrIE10)
36
43
if err != nil {
37
44
log.Fatal(err)
38
45
}
39
46
40
- // Define and insert the new data.
41
- _, ipUS, err := net.ParseCIDR(cidrUS)
47
+ _, ipUS124, err := net.ParseCIDR(cidrUS127)
48
+ if err != nil {
49
+ log.Fatal(err)
50
+ }
51
+ _, ipUS10, err := net.ParseCIDR(cidrUS10)
42
52
if err != nil {
43
53
log.Fatal(err)
44
54
}
@@ -77,10 +87,16 @@ func createCityDB(dbName, dbType string) {
77
87
},
78
88
}
79
89
80
- if err := writer.InsertFunc(ipIE, inserter.TopLevelMergeWith(recordIE)); err != nil {
90
+ if err := writer.InsertFunc(ipIE127, inserter.TopLevelMergeWith(recordIE)); err != nil {
91
+ log.Fatal(err)
92
+ }
93
+ if err := writer.InsertFunc(ipIE10, inserter.TopLevelMergeWith(recordIE)); err != nil {
81
94
log.Fatal(err)
82
95
}
83
- if err := writer.InsertFunc(ipUS, inserter.TopLevelMergeWith(recordUS)); err != nil {
96
+ if err := writer.InsertFunc(ipUS124, inserter.TopLevelMergeWith(recordUS)); err != nil {
97
+ log.Fatal(err)
98
+ }
99
+ if err := writer.InsertFunc(ipUS10, inserter.TopLevelMergeWith(recordUS)); err != nil {
84
100
log.Fatal(err)
85
101
}
86
102
@@ -93,4 +109,5 @@ func createCityDB(dbName, dbType string) {
93
109
if err != nil {
94
110
log.Fatal(err)
95
111
}
96
- }*/
112
+ }
113
+ */
0 commit comments