1- [ ![ Go Report Card] ( https://goreportcard.com/badge/github.com/ip2location/ip2proxy-go/v3 )] ( https://goreportcard.com/report/github.com/ip2location/ip2proxy-go/v3 )
2- [ ![ PkgGoDev] ( https://pkg.go.dev/badge/github.com/ip2location/ip2proxy-go/v3 )] ( https://pkg.go.dev/github.com/ip2location/ip2proxy-go/v3 )
1+ [ ![ Go Report Card] ( https://goreportcard.com/badge/github.com/ip2location/ip2proxy-go/v4 )] ( https://goreportcard.com/report/github.com/ip2location/ip2proxy-go/v4 )
2+ [ ![ PkgGoDev] ( https://pkg.go.dev/badge/github.com/ip2location/ip2proxy-go/v4 )] ( https://pkg.go.dev/github.com/ip2location/ip2proxy-go/v4 )
33
44# IP2Proxy Go Package
55
@@ -18,7 +18,7 @@ To install this module type the following:
1818
1919``` bash
2020
21- go get github.com/ip2location/ip2proxy-go/v3
21+ go get github.com/ip2location/ip2proxy-go/v4
2222
2323```
2424
@@ -57,7 +57,8 @@ package main
5757
5858import (
5959 " fmt"
60- " github.com/ip2location/ip2proxy-go/v3"
60+ " strconv"
61+ " github.com/ip2location/ip2proxy-go/v4"
6162)
6263
6364func main () {
@@ -78,20 +79,19 @@ func main() {
7879 fmt.Printf (" PackageVersion: %s \n " , db.PackageVersion ())
7980 fmt.Printf (" DatabaseVersion: %s \n " , db.DatabaseVersion ())
8081
81- fmt.Printf (" isProxy: %s \n " , all[" isProxy" ])
82- fmt.Printf (" ProxyType: %s \n " , all[" ProxyType" ])
83- fmt.Printf (" CountryShort: %s \n " , all[" CountryShort" ])
84- fmt.Printf (" CountryLong: %s \n " , all[" CountryLong" ])
85- fmt.Printf (" Region: %s \n " , all[" Region" ])
86- fmt.Printf (" City: %s \n " , all[" City" ])
87- fmt.Printf (" ISP: %s \n " , all[" ISP" ])
88- fmt.Printf (" Domain: %s \n " , all[" Domain" ])
89- fmt.Printf (" UsageType: %s \n " , all[" UsageType" ])
90- fmt.Printf (" ASN: %s \n " , all[" ASN" ])
91- fmt.Printf (" AS: %s \n " , all[" AS" ])
92- fmt.Printf (" LastSeen: %s \n " , all[" LastSeen" ])
93- fmt.Printf (" Threat: %s \n " , all[" Threat" ])
94- fmt.Printf (" Provider: %s \n " , all[" Provider" ])
82+ fmt.Printf (" IsProxy: %s \n " , strconv.Itoa (int (all.IsProxy )));
83+ fmt.Printf (" ProxyType: %s \n " , all.ProxyType );
84+ fmt.Printf (" CountryShort: %s \n " , all.CountryShort );
85+ fmt.Printf (" CountryLong: %s \n " , all.CountryLong );
86+ fmt.Printf (" Region: %s \n " , all.Region );
87+ fmt.Printf (" City: %s \n " , all.City );
88+ fmt.Printf (" Isp: %s \n " , all.Isp );
89+ fmt.Printf (" Domain: %s \n " , all.Domain );
90+ fmt.Printf (" UsageType: %s \n " , all.UsageType );
91+ fmt.Printf (" Asn: %s \n " , all.Asn );
92+ fmt.Printf (" As: %s \n " , all.As );
93+ fmt.Printf (" LastSeen: %s \n " , all.LastSeen );
94+ fmt.Printf (" Threat: %s \n " , all.Threat );
9595
9696 db.Close ()
9797}
0 commit comments