diff options
author | Martin Polden <mpolden@mpolden.no> | 2018-02-10 20:10:16 +0300 |
---|---|---|
committer | Martin Polden <mpolden@mpolden.no> | 2018-02-10 20:10:16 +0300 |
commit | 8b1d263e58de9b3dcc1a6eaa3cdd329952b8e79e (patch) | |
tree | be7278c2a00780d32428f1f01db8869b531a4e3f /http | |
parent | da3502d42997e2aadc46d1108a7efde10478ed6a (diff) |
Remove unnecessary imports
Diffstat (limited to 'http')
-rw-r--r-- | http/http.go | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/http/http.go b/http/http.go index 8e9b96d..7ae0340 100644 --- a/http/http.go +++ b/http/http.go @@ -10,10 +10,8 @@ import ( "github.com/mpolden/ipd/useragent" "github.com/sirupsen/logrus" - "math/big" "net" "net/http" - "path/filepath" "strconv" "strings" @@ -38,12 +36,12 @@ type Server struct { } type Response struct { - 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"` + 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"` } type PortResponse struct { @@ -194,7 +192,7 @@ func (s *Server) DefaultHandler(w http.ResponseWriter, r *http.Request) *appErro if err != nil { return internalServerError(err) } - t, err := template.New(filepath.Base(s.Template)).ParseFiles(s.Template) + t, err := template.ParseFiles(s.Template) if err != nil { return internalServerError(err) } |