diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 086343e..d2a6d81 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,7 +16,7 @@ jobs: steps: - uses: actions/setup-go@v3 with: - go-version: 1.20.x + go-version: 1.21.x - name: Set env shell: bash @@ -44,7 +44,7 @@ jobs: strategy: matrix: - go-version: [1.19.x, 1.20.x] + go-version: ["1.21.8", "1.22.1"] os: [ubuntu-22.04] steps: @@ -64,7 +64,7 @@ jobs: - uses: golangci/golangci-lint-action@v3 with: - version: v1.51.1 + version: v1.56.1 working-directory: src/github.com/containerd/go-cni tests: @@ -74,7 +74,7 @@ jobs: strategy: matrix: - go-version: [1.19.x, 1.20.x] + go-version: ["1.21.8", "1.22.1"] steps: - uses: actions/checkout@v3 diff --git a/cni_test.go b/cni_test.go index c2b0b2f..9ed45e2 100644 --- a/cni_test.go +++ b/cni_test.go @@ -289,32 +289,32 @@ type MockCNI struct { mock.Mock } -func (m *MockCNI) AddNetwork(ctx context.Context, net *cnilibrary.NetworkConfig, rt *cnilibrary.RuntimeConf) (types.Result, error) { +func (m *MockCNI) AddNetwork(_ context.Context, net *cnilibrary.NetworkConfig, rt *cnilibrary.RuntimeConf) (types.Result, error) { args := m.Called(net, rt) return args.Get(0).(types.Result), args.Error(1) } -func (m *MockCNI) DelNetwork(ctx context.Context, net *cnilibrary.NetworkConfig, rt *cnilibrary.RuntimeConf) error { +func (m *MockCNI) DelNetwork(_ context.Context, net *cnilibrary.NetworkConfig, rt *cnilibrary.RuntimeConf) error { args := m.Called(net, rt) return args.Error(0) } -func (m *MockCNI) DelNetworkList(ctx context.Context, net *cnilibrary.NetworkConfigList, rt *cnilibrary.RuntimeConf) error { +func (m *MockCNI) DelNetworkList(_ context.Context, net *cnilibrary.NetworkConfigList, rt *cnilibrary.RuntimeConf) error { args := m.Called(net, rt) return args.Error(0) } -func (m *MockCNI) AddNetworkList(ctx context.Context, net *cnilibrary.NetworkConfigList, rt *cnilibrary.RuntimeConf) (types.Result, error) { +func (m *MockCNI) AddNetworkList(_ context.Context, net *cnilibrary.NetworkConfigList, rt *cnilibrary.RuntimeConf) (types.Result, error) { args := m.Called(net, rt) return args.Get(0).(types.Result), args.Error(1) } -func (m *MockCNI) CheckNetworkList(ctx context.Context, net *cnilibrary.NetworkConfigList, rt *cnilibrary.RuntimeConf) error { +func (m *MockCNI) CheckNetworkList(_ context.Context, net *cnilibrary.NetworkConfigList, rt *cnilibrary.RuntimeConf) error { args := m.Called(net, rt) return args.Error(0) } -func (m *MockCNI) CheckNetwork(ctx context.Context, net *cnilibrary.NetworkConfig, rt *cnilibrary.RuntimeConf) error { +func (m *MockCNI) CheckNetwork(_ context.Context, net *cnilibrary.NetworkConfig, rt *cnilibrary.RuntimeConf) error { args := m.Called(net, rt) return args.Error(0) } @@ -329,12 +329,12 @@ func (m *MockCNI) GetNetworkCachedResult(net *cnilibrary.NetworkConfig, rt *cnil return args.Get(0).(types.Result), args.Error(1) } -func (m *MockCNI) ValidateNetworkList(ctx context.Context, net *cnilibrary.NetworkConfigList) ([]string, error) { +func (m *MockCNI) ValidateNetworkList(_ context.Context, net *cnilibrary.NetworkConfigList) ([]string, error) { args := m.Called(net) return args.Get(0).([]string), args.Error(1) } -func (m *MockCNI) ValidateNetwork(ctx context.Context, net *cnilibrary.NetworkConfig) ([]string, error) { +func (m *MockCNI) ValidateNetwork(_ context.Context, net *cnilibrary.NetworkConfig) ([]string, error) { args := m.Called(net) return args.Get(0).([]string), args.Error(1) } diff --git a/go.mod b/go.mod index 65ea60f..65e1109 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/containerd/go-cni -go 1.19 +go 1.21 require ( github.com/containernetworking/cni v1.1.2 diff --git a/integration/go.mod b/integration/go.mod index ba6a574..89f397b 100644 --- a/integration/go.mod +++ b/integration/go.mod @@ -1,6 +1,6 @@ module github.com/containerd/go-cni/integration -go 1.17 +go 1.21 require ( github.com/containerd/continuity v0.2.2