From 7940c5dfb954af87cb3d593f61270a0f2034f5df Mon Sep 17 00:00:00 2001 From: Zlatko Bratkovic Date: Fri, 1 Dec 2023 10:50:47 +0100 Subject: [PATCH] BUILD/MINOR: use 1.55.2 golangci linter --- Makefile | 2 +- configuration/configuration.go | 4 ++-- configuration/global.go | 3 --- configuration/peer_entry.go | 2 +- configuration/ring.go | 2 +- 5 files changed, 5 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 6f40185d..da9dfa06 100644 --- a/Makefile +++ b/Makefile @@ -2,7 +2,7 @@ PROJECT_PATH=${PWD} DOCKER_HAPROXY_VERSION?=2.8 SWAGGER_VERSION=v0.30.2 GO_VERSION:=${shell go mod edit -json | jq -r .Go} -GOLANGCI_LINT_VERSION=1.54.2 +GOLANGCI_LINT_VERSION=1.55.2 .PHONY: test test: diff --git a/configuration/configuration.go b/configuration/configuration.go index 0e3b5628..d4ecdbc2 100644 --- a/configuration/configuration.go +++ b/configuration/configuration.go @@ -2716,7 +2716,7 @@ func (s *SectionObject) errorloc302(field reflect.Value) error { } e := &types.ErrorLoc302{ - Code: fmt.Sprintf("%d", *errorLoc.Code), + Code: strconv.FormatInt(*errorLoc.Code, 10), URL: *errorLoc.URL, } return s.set("errorloc302", e) @@ -2732,7 +2732,7 @@ func (s *SectionObject) errorloc303(field reflect.Value) error { } e := &types.ErrorLoc303{ - Code: fmt.Sprintf("%d", *errorLoc.Code), + Code: strconv.FormatInt(*errorLoc.Code, 10), URL: *errorLoc.URL, } diff --git a/configuration/global.go b/configuration/global.go index 4a947738..4f70dd27 100644 --- a/configuration/global.go +++ b/configuration/global.go @@ -2295,7 +2295,6 @@ func serializeWurflOptions(p parser.Parser, options *models.GlobalWurflOptions) if err := serializeStringOption(p, "wurfl-patch-file", options.PatchFile); err != nil { return err } - //nolint:revive if err := serializeInt64Option(p, "wurfl-cache-size", options.CacheSize); err != nil { return err } @@ -2315,7 +2314,6 @@ func serializeDeviceAtlasOptions(p parser.Parser, options *models.GlobalDeviceAt if err := serializeStringOption(p, "deviceatlas-separator", options.Separator); err != nil { return err } - //nolint:revive if err := serializeStringOption(p, "deviceatlas-properties-cookie", options.PropertiesCookie); err != nil { return err } @@ -2335,7 +2333,6 @@ func serializeFiftyOneDegreesOptions(p parser.Parser, options *models.GlobalFift if err := serializeStringOption(p, "51degrees-property-separator", options.PropertySeparator); err != nil { return err } - //nolint:revive if err := serializeInt64Option(p, "51degrees-cache-size", options.CacheSize); err != nil { return err } diff --git a/configuration/peer_entry.go b/configuration/peer_entry.go index a2067a90..a283378a 100644 --- a/configuration/peer_entry.go +++ b/configuration/peer_entry.go @@ -200,7 +200,7 @@ func SerializePeerEntry(pe models.PeerEntry) types.Peer { Port: *pe.Port, } if pe.Shard != 0 { - peer.Shard = fmt.Sprintf("%d", pe.Shard) + peer.Shard = strconv.FormatInt(pe.Shard, 10) } return peer } diff --git a/configuration/ring.go b/configuration/ring.go index 888efca9..2b1fe201 100644 --- a/configuration/ring.go +++ b/configuration/ring.go @@ -285,7 +285,7 @@ func SerializeRingSection(p parser.Parser, data *models.Ring) error { //nolint:g return err } } else { - d := types.StringC{Value: fmt.Sprint(*data.Size)} + d := types.StringC{Value: strconv.FormatInt(*data.Size, 10)} if err = p.Set(parser.Ring, data.Name, "size", d); err != nil { return err }