diff --git a/Dockerfile b/Dockerfile index 979a58b..f4c8ada 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,10 +1,10 @@ -FROM golang:1.12.6-alpine3.9 AS build +FROM golang:1.14.7-alpine3.12 AS build WORKDIR /go/src/github.com/abh/geoipapi ADD . /go/src/github.com/abh/geoipapi RUN go install -v ./... -FROM quay.io/ntppool/dnsmapper:geoip-data-201906 +FROM quay.io/ntppool/dnsmapper:geoip-data-202007 USER root RUN apk --no-cache add ca-certificates diff --git a/geoipapi.go b/geoipapi.go index 3428e9e..596c287 100644 --- a/geoipapi.go +++ b/geoipapi.go @@ -84,7 +84,7 @@ func getCity(req *http.Request) (*geoip2.City, error) { ipStr := req.FormValue("ip") ip := net.ParseIP(ipStr) if ip == nil { - return nil, fmt.Errorf("Missing IP") + return nil, fmt.Errorf("missing IP address") } return getCityIP(ip) }