Skip to content

Commit

Permalink
drop support for Go 1.19
Browse files Browse the repository at this point in the history
  • Loading branch information
FZambia committed Aug 8, 2023
1 parent d1a02db commit d8fbc5b
Show file tree
Hide file tree
Showing 10 changed files with 13 additions and 60 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4
with:
go-version: '1.19.x'
go-version: '1.20.x'
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.50.0
version: v1.53.3
args: --timeout 3m0s
build:
name: Test with Go ${{ matrix.go-version }} Redis ${{ matrix.redis-version }}
Expand All @@ -23,7 +23,7 @@ jobs:
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
strategy:
matrix:
go-version: ["1.19", "1.20"]
go-version: ["1.20", "1.21"]
redis-version: [5, 6, 7]
steps:
- name: Install Go stable version
Expand All @@ -43,7 +43,7 @@ jobs:
run: go test -v -race -tags integration -coverprofile=coverage.out $(go list ./... | grep -v /_examples/)

- name: Upload code coverage to codecov
if: matrix.go-version == '1.20'
if: matrix.go-version == '1.21'
uses: codecov/codecov-action@v3
with:
file: ./coverage.out
2 changes: 1 addition & 1 deletion _examples/go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ require (
github.com/prometheus/client_model v0.3.0 // indirect
github.com/prometheus/common v0.42.0 // indirect
github.com/prometheus/procfs v0.10.1 // indirect
github.com/redis/rueidis v1.0.14-go1.18 // indirect
github.com/redis/rueidis v1.0.14 // indirect
github.com/segmentio/asm v1.2.0 // indirect
github.com/segmentio/encoding v0.3.6 // indirect
github.com/twitchyliquid64/golang-asm v0.15.1 // indirect
Expand Down
4 changes: 2 additions & 2 deletions _examples/go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,8 @@ github.com/prometheus/procfs v0.0.0-20180725123919-05ee40e3a273/go.mod h1:c3At6R
github.com/prometheus/procfs v0.10.1 h1:kYK1Va/YMlutzCGazswoHKo//tZVlFpKYh+PymziUAg=
github.com/prometheus/procfs v0.10.1/go.mod h1:nwNm2aOCAYw8uTR/9bWRREkZFxAUcWzPHWJq+XBB/FM=
github.com/quasoft/memstore v0.0.0-20180925164028-84a050167438/go.mod h1:wTPjTepVu7uJBYgZ0SdWHQlIas582j6cn2jgk4DDdlg=
github.com/redis/rueidis v1.0.14-go1.18 h1:dGir5z8w8X1ex7JWO/Zx2FMBrZgQ8Yjm+lw9fPLSNGw=
github.com/redis/rueidis v1.0.14-go1.18/go.mod h1:HGekzV3HbmzFmRK6j0xic8Z9119+ECoGMjeN1TV1NYU=
github.com/redis/rueidis v1.0.14 h1:qdFZahk1F/2L+sZeOECx5E2N5J4Qc51b7ezSUpQXJfs=
github.com/redis/rueidis v1.0.14/go.mod h1:8B+r5wdnjwK3lTFml5VtxjzGOQAC+5UmujoD12pDrEo=
github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ=
github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g=
github.com/segmentio/asm v1.1.3/go.mod h1:Ld3L4ZXGNcSLRg4JBsZ3//1+f/TjYl0Mzen/DQy1EJg=
Expand Down
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/centrifugal/centrifuge

go 1.19
go 1.20

require (
github.com/FZambia/eagle v0.1.0
Expand All @@ -9,7 +9,7 @@ require (
github.com/gorilla/websocket v1.5.0
github.com/igm/sockjs-go/v3 v3.0.2
github.com/prometheus/client_golang v1.16.0
github.com/redis/rueidis v1.0.14-go1.18
github.com/redis/rueidis v1.0.14
github.com/segmentio/encoding v0.3.6
github.com/stretchr/testify v1.8.4
golang.org/x/sync v0.3.0
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ github.com/prometheus/common v0.42.0 h1:EKsfXEYo4JpWMHH5cg+KOUWeuJSov1Id8zGR8eeI
github.com/prometheus/common v0.42.0/go.mod h1:xBwqVerjNdUDjgODMpudtOMwlOwf2SaTr1yjz4b7Zbc=
github.com/prometheus/procfs v0.10.1 h1:kYK1Va/YMlutzCGazswoHKo//tZVlFpKYh+PymziUAg=
github.com/prometheus/procfs v0.10.1/go.mod h1:nwNm2aOCAYw8uTR/9bWRREkZFxAUcWzPHWJq+XBB/FM=
github.com/redis/rueidis v1.0.14-go1.18 h1:dGir5z8w8X1ex7JWO/Zx2FMBrZgQ8Yjm+lw9fPLSNGw=
github.com/redis/rueidis v1.0.14-go1.18/go.mod h1:HGekzV3HbmzFmRK6j0xic8Z9119+ECoGMjeN1TV1NYU=
github.com/redis/rueidis v1.0.14 h1:qdFZahk1F/2L+sZeOECx5E2N5J4Qc51b7ezSUpQXJfs=
github.com/redis/rueidis v1.0.14/go.mod h1:8B+r5wdnjwK3lTFml5VtxjzGOQAC+5UmujoD12pDrEo=
github.com/rogpeppe/go-internal v1.10.0 h1:TMyTOH3F/DB16zRVcYyreMH6GnZZrwQVAoYjRBZyWFQ=
github.com/rogpeppe/go-internal v1.10.0/go.mod h1:UQnix2H7Ngw/k4C5ijL5+65zddjncjaFoBhdsK/akog=
github.com/segmentio/asm v1.1.3/go.mod h1:Ld3L4ZXGNcSLRg4JBsZ3//1+f/TjYl0Mzen/DQy1EJg=
Expand Down
2 changes: 1 addition & 1 deletion handler_http_stream.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ func (h *HTTPStreamHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
return
}

rc := newResponseController(w)
rc := http.NewResponseController(w)

reader := readerpool.GetBytesReader(requestData)
_ = HandleReadFrame(c, reader)
Expand Down
2 changes: 1 addition & 1 deletion handler_sse.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ func (h *SSEHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
if !ok {
return
}
rc := newResponseController(w)
rc := http.NewResponseController(w)
_ = rc.SetWriteDeadline(time.Now().Add(streamingResponseWriteTimeout))

Check failure on line 111 in handler_sse.go

View workflow job for this annotation

GitHub Actions / Lint

undefined: streamingResponseWriteTimeout

Check failure on line 111 in handler_sse.go

View workflow job for this annotation

GitHub Actions / Test with Go 1.20 Redis 5

undefined: streamingResponseWriteTimeout

Check failure on line 111 in handler_sse.go

View workflow job for this annotation

GitHub Actions / Test with Go 1.20 Redis 6

undefined: streamingResponseWriteTimeout

Check failure on line 111 in handler_sse.go

View workflow job for this annotation

GitHub Actions / Test with Go 1.20 Redis 7

undefined: streamingResponseWriteTimeout

Check failure on line 111 in handler_sse.go

View workflow job for this annotation

GitHub Actions / Test with Go 1.21 Redis 5

undefined: streamingResponseWriteTimeout

Check failure on line 111 in handler_sse.go

View workflow job for this annotation

GitHub Actions / Test with Go 1.21 Redis 6

undefined: streamingResponseWriteTimeout

Check failure on line 111 in handler_sse.go

View workflow job for this annotation

GitHub Actions / Test with Go 1.21 Redis 7

undefined: streamingResponseWriteTimeout
_, err = w.Write([]byte("\r\n"))
if err != nil {
Expand Down
10 changes: 0 additions & 10 deletions response_controller.go

This file was deleted.

11 changes: 0 additions & 11 deletions response_controller_go120.go

This file was deleted.

26 changes: 0 additions & 26 deletions response_controller_legacy.go

This file was deleted.

0 comments on commit d8fbc5b

Please sign in to comment.