Skip to content

Commit

Permalink
Added support for go 1.20.
Browse files Browse the repository at this point in the history
Signed-off-by: bwplotka <bwplotka@gmail.com>
  • Loading branch information
bwplotka committed Mar 17, 2023
1 parent 3d2cf0b commit 073ac5f
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,10 @@ workflows:
name: go-1-19
go_version: "1.19"
run_lint: true
- test:
name: go-1-20
go_version: "1.20"
run_lint: true
# Style and unused/missing packages are only checked against
# the latest supported Go version.
run_style_and_unused: true
4 changes: 3 additions & 1 deletion prometheus/gen_go_collector_metrics_set.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ func main() {
if err != nil {
log.Fatal(err)
}
gv, err := version.NewVersion(strings.TrimPrefix(toolVersion, "go"))

toolVersion = strings.Split(strings.TrimPrefix(toolVersion, "go"), " ")[0]
gv, err := version.NewVersion(toolVersion)
if err != nil {
log.Fatal(err)
}
Expand Down
57 changes: 57 additions & 0 deletions prometheus/go_collector_metrics_go120_test.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 073ac5f

Please sign in to comment.