Browse Source

fix staticcheck

pull/107/head v0.12.1
wagslane 3 years ago
parent
commit
919fdfb388
4 changed files with 5 additions and 7 deletions
  1. +2
    -2
      .github/workflows/tests.yml
  2. +1
    -1
      go.mod
  3. +2
    -1
      internal/channelmanager/safe_wraps.go
  4. +0
    -3
      internal/dispatcher/dispatcher_test.go

+ 2
- 2
.github/workflows/tests.yml View File

@ -12,10 +12,10 @@ jobs:
GOPROXY: "https://proxy.golang.org,direct"
steps:
- name: Set up Go 1.18
- name: Set up Go 1.20
uses: actions/setup-go@v2
with:
go-version: 1.18
go-version: 1.20
id: go
- name: Check out code into the Go module directory


+ 1
- 1
go.mod View File

@ -1,5 +1,5 @@
module github.com/wagslane/go-rabbitmq
go 1.17
go 1.20
require github.com/rabbitmq/amqp091-go v1.5.0

+ 2
- 1
internal/channelmanager/safe_wraps.go View File

@ -144,7 +144,8 @@ func (chanManager *ChannelManager) PublishSafe(
chanManager.channelMux.RLock()
defer chanManager.channelMux.RUnlock()
return chanManager.channel.Publish(
return chanManager.channel.PublishWithContext(
context.Background(),
exchange,
key,
mandatory,


+ 0
- 3
internal/dispatcher/dispatcher_test.go View File

@ -7,9 +7,6 @@ import (
func TestNewDispatcher(t *testing.T) {
d := NewDispatcher()
if d == nil {
t.Error("Dispatcher is nil")
}
if d.subscribers == nil {
t.Error("Dispatcher subscribers is nil")
}


Loading…
Cancel
Save