Skip to content

Commit

Permalink
Merge pull request #518 from grafana/jvp/bump-go-mod-and-go-build-ver…
Browse files Browse the repository at this point in the history
…sion

Bump go mod to 1.20 and go build to 1.20.4
  • Loading branch information
jesusvazquez authored May 8, 2023
2 parents f34ad94 + fdb3b4c commit c40260d
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 13 deletions.
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down
20 changes: 10 additions & 10 deletions go-whisper/whisper.go
Original file line number Diff line number Diff line change
Expand Up @@ -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, ":")
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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))))
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit c40260d

Please sign in to comment.