Skip to content

Commit

Permalink
update go version
Browse files Browse the repository at this point in the history
  • Loading branch information
nxcc committed Mar 20, 2024
1 parent 165901f commit b1087be
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.20rc3 as builder
FROM golang:1.22.1 as builder
WORKDIR /go/src/app
COPY . ./
RUN CGO_ENABLED=0 go build -trimpath -ldflags="-s -w" -o ip-auth-proxy .
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.2.2
0.2.3
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module ip-auth-proxy

go 1.19
go 1.22
4 changes: 2 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
_ "embed"
"flag"
"fmt"
"io/ioutil"
"io"
"log"
"net"
"net/http"
Expand Down Expand Up @@ -156,7 +156,7 @@ func rewriteResponse(res *http.Response) error {
}

body := bb.Bytes()
res.Body = ioutil.NopCloser(bytes.NewReader(body))
res.Body = io.NopCloser(bytes.NewReader(body))
res.ContentLength = int64(len(body))
res.Header.Set("Content-Length", strconv.Itoa(len(body)))

Expand Down

0 comments on commit b1087be

Please sign in to comment.