Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpolden/echoip.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/http
diff options
context:
space:
mode:
authorrufo <rufus@rufus.al>2018-08-20 05:03:49 +0300
committerrufo <rufus@rufus.al>2018-08-20 05:03:49 +0300
commit6d915d0f962a8ed222da428d079b3cb56676389c (patch)
treecc915c7303c18d7ed08f6e833d0fe4dfd87f3a48 /http
parenta9c0587f87871f3db1310ec537e6233067c6517d (diff)
use big int for decimal IP rather than uint64
Diffstat (limited to 'http')
-rw-r--r--http/http.go13
1 files changed, 7 insertions, 6 deletions
diff --git a/http/http.go b/http/http.go
index b4130f6..5cc3082 100644
--- a/http/http.go
+++ b/http/http.go
@@ -11,6 +11,7 @@ import (
"github.com/mpolden/ipd/iputil/geo"
"github.com/mpolden/ipd/useragent"
+ "math/big"
"net"
"net/http"
"strconv"
@@ -30,12 +31,12 @@ type Server struct {
}
type Response struct {
- IP net.IP `json:"ip"`
- IPDecimal uint64 `json:"ip_decimal"`
- Country string `json:"country,omitempty"`
- CountryISO string `json:"country_iso,omitempty"`
- City string `json:"city,omitempty"`
- Hostname string `json:"hostname,omitempty"`
+ IP net.IP `json:"ip"`
+ IPDecimal *big.Int `json:"ip_decimal"`
+ Country string `json:"country,omitempty"`
+ CountryISO string `json:"country_iso,omitempty"`
+ City string `json:"city,omitempty"`
+ Hostname string `json:"hostname,omitempty"`
}
type PortResponse struct {