From 4140706a8bcef535a57bfd3661b6852d5c777d51 Mon Sep 17 00:00:00 2001 From: Wenying Dong Date: Thu, 24 Aug 2023 22:35:10 -0700 Subject: [PATCH] Bump up go and golangci-lint version (#52) 1. Bump up go version to v1.21 2. Bump up golangci-lint version to v1.54.2 Signed-off-by: wenyingd --- Makefile | 2 +- VERSION | 2 +- go.mod | 4 ++-- go.sum | 3 ++- openflow13/instruction.go | 2 +- openflow15/instruction.go | 2 +- 6 files changed, 8 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index 773555f..7db665b 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ GO ?= go -GOLANGCI_LINT_VERSION := v1.52.2 +GOLANGCI_LINT_VERSION := v1.54.2 GOLANGCI_LINT_BINDIR := .golangci-bin GOLANGCI_LINT_BIN := $(GOLANGCI_LINT_BINDIR)/$(GOLANGCI_LINT_VERSION)/golangci-lint diff --git a/VERSION b/VERSION index 9ca265d..6345c21 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -v0.12.1 +v0.13.0 diff --git a/go.mod b/go.mod index 55d4301..316a254 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module antrea.io/libOpenflow -go 1.19 +go 1.21 require ( github.com/sirupsen/logrus v1.9.3 @@ -12,6 +12,6 @@ require ( github.com/davecgh/go-spew v1.1.1 // indirect github.com/go-logr/logr v1.2.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8 // indirect + golang.org/x/sys v0.5.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect ) diff --git a/go.sum b/go.sum index 5db0669..fda2e83 100644 --- a/go.sum +++ b/go.sum @@ -11,8 +11,9 @@ github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+ github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.4 h1:CcVxjf3Q8PM0mHUKJCdn+eZZtm5yQwehR5yeSVQQcUk= github.com/stretchr/testify v1.8.4/go.mod h1:sz/lmYIOXD/1dqDmKjjqLyZ2RngseejIcXlSw2iwfAo= -golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8 h1:0A+M6Uqn+Eje4kHMK80dtF3JCXC4ykBgQG4Fe06QRhQ= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= +golang.org/x/sys v0.5.0 h1:MUK/U/4lj1t1oPg0HfuXDN/Z1wv31ZJ/YcPiGccS4DU= +golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM= gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/openflow13/instruction.go b/openflow13/instruction.go index d250c3a..64bf790 100644 --- a/openflow13/instruction.go +++ b/openflow13/instruction.go @@ -36,7 +36,7 @@ func (a *InstrHeader) Len() (n uint16) { } func (a *InstrHeader) MarshalBinary() (data []byte, err error) { - data = make([]byte, a.Len()) + data = make([]byte, 4) binary.BigEndian.PutUint16(data[:2], a.Type) binary.BigEndian.PutUint16(data[2:4], a.Length) return diff --git a/openflow15/instruction.go b/openflow15/instruction.go index 8e31744..69fe787 100644 --- a/openflow15/instruction.go +++ b/openflow15/instruction.go @@ -41,7 +41,7 @@ func (a *InstrHeader) Len() (n uint16) { } func (a *InstrHeader) MarshalBinary() (data []byte, err error) { - data = make([]byte, a.Len()) + data = make([]byte, 4) binary.BigEndian.PutUint16(data[:2], a.Type) binary.BigEndian.PutUint16(data[2:4], a.Length) return