Skip to content

Commit

Permalink
chore: upgrade golangci-lint
Browse files Browse the repository at this point in the history
  • Loading branch information
palkan committed Aug 10, 2022
1 parent 2538fa1 commit 688986f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ gen-ssl:

bin/golangci-lint:
@test -x $$(go env GOPATH)/bin/golangci-lint || \
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $$(go env GOPATH)/bin v1.46.2
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $$(go env GOPATH)/bin v1.48.0

lint: bin/golangci-lint
$$(go env GOPATH)/bin/golangci-lint run
Expand Down
4 changes: 2 additions & 2 deletions pubsub/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package pubsub

import (
"fmt"
"io/ioutil"
"io"
"net/http"
"strconv"

Expand Down Expand Up @@ -100,7 +100,7 @@ func (s *HTTPSubscriber) Handler(w http.ResponseWriter, r *http.Request) {
}
}

body, err := ioutil.ReadAll(r.Body)
body, err := io.ReadAll(r.Body)

if err != nil {
s.log.Error("Failed to read request body")
Expand Down
3 changes: 2 additions & 1 deletion server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"net"
"net/http"
"sync"
"time"

"github.com/apex/log"
"golang.org/x/net/netutil"
Expand Down Expand Up @@ -59,7 +60,7 @@ func NewServer(host string, port string, ssl *SSLConfig, maxConn int) (*HTTPServ
mux := http.NewServeMux()
addr := net.JoinHostPort(host, port)

server := &http.Server{Addr: addr, Handler: mux}
server := &http.Server{Addr: addr, Handler: mux, ReadHeaderTimeout: 5 * time.Second}

secured := (ssl != nil) && ssl.Available()

Expand Down

0 comments on commit 688986f

Please sign in to comment.