We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 635404f commit 4641e77Copy full SHA for 4641e77
example_test.go
@@ -11,14 +11,14 @@ import (
11
func Example() {
12
db, err := Open("test-data/test-data/GeoIP2-City-Test.mmdb")
13
if err != nil {
14
- log.Fatal(err)
+ log.Panic(err)
15
}
16
defer db.Close()
17
// If you are using strings that may be invalid, check that ip is not nil
18
ip := net.ParseIP("81.2.69.142")
19
record, err := db.City(ip)
20
21
22
23
fmt.Printf("Portuguese (BR) city name: %v\n", record.City.Names["pt-BR"])
24
fmt.Printf("English subdivision name: %v\n", record.Subdivisions[0].Names["en"])
0 commit comments