From fdb3b4ca954a4d2ed0f4cf9802082faa5deb5e61 Mon Sep 17 00:00:00 2001 From: Jesus Vazquez Date: Fri, 5 May 2023 14:12:14 +0200 Subject: [PATCH] Bump go mod to 1.20 and go build to 1.20.4 Signed-off-by: Jesus Vazquez --- .circleci/config.yml | 4 ++-- CHANGELOG.md | 4 ++++ go-whisper/whisper.go | 20 ++++++++++---------- go.mod | 2 +- 4 files changed, 17 insertions(+), 13 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index ca127f6a8..f79257e22 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -75,7 +75,7 @@ jobs: build: working_directory: /home/circleci/go/src/github.com/grafana/carbon-relay-ng docker: - - image: cimg/go:1.20.3 + - image: cimg/go:1.20.4 steps: - checkout - run: go install github.com/go-bindata/go-bindata/...@latest @@ -166,7 +166,7 @@ jobs: github_binaries: docker: - - image: cimg/go:1.20.3 + - image: cimg/go:1.20.4 steps: - checkout - run: curl -sfL https://goreleaser.com/static/run | bash diff --git a/CHANGELOG.md b/CHANGELOG.md index bb742616c..9aad72c1b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,8 @@ # unreleased + +# v1.4.3: May 5, 2023 +* Bump go mod version to 1.20 and update go images used to build carbon-relay-ng to 1.20.4 #518 + # v1.4.2: April 19, 2023 * Update go images used to build carbon-relay-ng to 1.20.3 #517 diff --git a/go-whisper/whisper.go b/go-whisper/whisper.go index 615bfb8fd..60195cc5c 100644 --- a/go-whisper/whisper.go +++ b/go-whisper/whisper.go @@ -59,13 +59,13 @@ func parseRetentionPart(retentionPart string) (int, error) { } /* - Parse a retention definition as you would find in the storage-schemas.conf of a Carbon install. - Note that this only parses a single retention definition, if you have multiple definitions (separated by a comma) - you will have to split them yourself. +Parse a retention definition as you would find in the storage-schemas.conf of a Carbon install. +Note that this only parses a single retention definition, if you have multiple definitions (separated by a comma) +you will have to split them yourself. - ParseRetentionDef("10s:14d") Retention{10, 120960} +ParseRetentionDef("10s:14d") Retention{10, 120960} - See: http://graphite.readthedocs.org/en/1.0/config-carbon.html#storage-schemas-conf +See: http://graphite.readthedocs.org/en/1.0/config-carbon.html#storage-schemas-conf */ func ParseRetentionDef(retentionDef string) (*Retention, error) { parts := strings.Split(retentionDef, ":") @@ -128,10 +128,10 @@ func validateRetentions(retentions Retentions) error { } /* - A retention level. +A retention level. - Retention levels describe a given archive in the database. How detailed it is and how far back - it records. +Retention levels describe a given archive in the database. How detailed it is and how far back +it records. */ type Retention struct { secondsPerPoint int @@ -178,8 +178,8 @@ func (r retentionsByPrecision) Less(i, j int) bool { } /* - Implementation of modulo that works like Python - Thanks @timmow for this +Implementation of modulo that works like Python +Thanks @timmow for this */ func mod(a, b int) int { return a - (b * int(math.Floor(float64(a)/float64(b)))) diff --git a/go.mod b/go.mod index 59c040bc7..a43b7925d 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/grafana/carbon-relay-ng -go 1.18 +go 1.20 require ( cloud.google.com/go v0.18.1-0.20180119164648-b1067c1d21b5