Skip to content

Commit

Permalink
Merge pull request #45 from roidelapluie/updatego
Browse files Browse the repository at this point in the history
Update go
  • Loading branch information
roidelapluie authored Dec 12, 2023
2 parents be2efba + 1b80da7 commit f5006f4
Show file tree
Hide file tree
Showing 17 changed files with 188 additions and 177 deletions.
12 changes: 7 additions & 5 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,13 @@ linters:

linters-settings:
depguard:
list-type: blacklist
include-go-root: true
packages-with-error-message:
- sync/atomic: "Use go.uber.org/atomic instead of sync/atomic"
- github.com/go-kit/kit/log: "Use github.com/go-kit/log instead of github.com/go-kit/kit/log"
rules:
main:
deny:
- pkg: sync/atomic
desc: "Use go.uber.org/atomic instead of sync/atomic"
- pkg: github.com/go-kit/kit/log
desc: "Use github.com/go-kit/log instead of github.com/go-kit/kit/log"
goimports:
local-prefixes: github.com/o11ydev/oy-toolkit
gofumpt:
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ packages:

.PHONY: vendorhash
vendorhash:
@go mod tidy -compat=1.17 -go=1.17
@go mod tidy -compat=1.21 -go=1.21
@sed -i '/vendorSha256/s@".*"@"$(shell go mod vendor && nix hash path vendor)"@' packages.nix
@rm -r vendor

Expand Down
2 changes: 1 addition & 1 deletion cmd/oy-csv-to-targets/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import (
"os"
"path/filepath"

"gopkg.in/alecthomas/kingpin.v2"
"github.com/alecthomas/kingpin/v2"

promlabels "github.com/prometheus/prometheus/model/labels"

Expand Down
2 changes: 1 addition & 1 deletion cmd/oy-expose/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
"github.com/o11ydev/oy-toolkit/util/collectors"
"github.com/o11ydev/oy-toolkit/util/http"

kingpin "gopkg.in/alecthomas/kingpin.v2"
kingpin "github.com/alecthomas/kingpin/v2"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion cmd/oy-periodic-queries/collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ func (c *groupsCollector) Collect(ch chan<- prometheus.Metric) {
}
}

func (c *groupsCollector) Describe(ch chan<- *prometheus.Desc) {
func (c *groupsCollector) Describe(chan<- *prometheus.Desc) {
}

func QueryRangeToMetric(logger log.Logger, c *Cache, p period.Period, query string, client api.Client, metricName string, additionalLabels map[string]string) ([]prometheus.Metric, error) {
Expand Down
5 changes: 3 additions & 2 deletions cmd/oy-periodic-queries/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
"github.com/o11ydev/oy-toolkit/util/cmd"
"github.com/o11ydev/oy-toolkit/util/http"

kingpin "gopkg.in/alecthomas/kingpin.v2"
kingpin "github.com/alecthomas/kingpin/v2"
)

func main() {
Expand Down Expand Up @@ -64,7 +64,8 @@ func main() {
r.MustRegister(periodicQueriesReady)
ch := make(chan prometheus.Metric)
go func(ch chan prometheus.Metric) {
for range ch {
for i := range ch {
_ = i
}
}(ch)
go func() {
Expand Down
2 changes: 1 addition & 1 deletion cmd/oy-scrape-jitter/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import (
"os"
"time"

"github.com/alecthomas/kingpin/v2"
"github.com/go-kit/log"
"github.com/go-kit/log/level"
"github.com/prometheus/client_golang/api"
Expand All @@ -30,7 +31,6 @@ import (
"gonum.org/v1/plot"
"gonum.org/v1/plot/plotter"
"gonum.org/v1/plot/vg"
"gopkg.in/alecthomas/kingpin.v2"

"github.com/o11ydev/oy-toolkit/util/client"
"github.com/o11ydev/oy-toolkit/util/cmd"
Expand Down
36 changes: 27 additions & 9 deletions flake.lock

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

66 changes: 32 additions & 34 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,60 +1,58 @@
module github.com/o11ydev/oy-toolkit

go 1.17
go 1.21

require (
github.com/alecthomas/kingpin/v2 v2.4.0
github.com/go-kit/log v0.2.1
github.com/prometheus/client_golang v1.14.0
github.com/prometheus/client_model v0.3.0
github.com/prometheus/common v0.39.0
github.com/prometheus/exporter-toolkit v0.8.2
github.com/prometheus/prometheus v0.42.0
github.com/stretchr/testify v1.8.1
golang.org/x/crypto v0.6.0
gonum.org/v1/plot v0.12.0
gopkg.in/alecthomas/kingpin.v2 v2.2.6
github.com/prometheus/client_golang v1.17.0
github.com/prometheus/client_model v0.5.0
github.com/prometheus/common v0.45.0
github.com/prometheus/exporter-toolkit v0.11.0
github.com/prometheus/prometheus v0.48.1
github.com/stretchr/testify v1.8.4
golang.org/x/crypto v0.16.0
gonum.org/v1/plot v0.14.0
gopkg.in/yaml.v2 v2.4.0
)

require (
git.sr.ht/~sbinet/gg v0.3.1 // indirect
git.sr.ht/~sbinet/gg v0.5.0 // indirect
github.com/ajstarks/svgo v0.0.0-20211024235047-1546f124cd8b // indirect
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 // indirect
github.com/alecthomas/units v0.0.0-20211218093645-b94a6e3cc137 // indirect
github.com/alecthomas/units v0.0.0-20231202071711-9a357b53e9c9 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/campoy/embedmd v1.0.0 // indirect
github.com/cespare/xxhash/v2 v2.2.0 // indirect
github.com/coreos/go-systemd/v22 v22.5.0 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/dennwc/varint v1.0.0 // indirect
github.com/go-fonts/liberation v0.2.0 // indirect
github.com/go-latex/latex v0.0.0-20210823091927-c0d11ff05a81 // indirect
github.com/go-fonts/liberation v0.3.2 // indirect
github.com/go-latex/latex v0.0.0-20231108140139-5c1ce85aa4ea // indirect
github.com/go-logfmt/logfmt v0.6.0 // indirect
github.com/go-pdf/fpdf v0.6.0 // indirect
github.com/go-pdf/fpdf v0.9.0 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/golang/protobuf v1.5.3 // indirect
github.com/grafana/regexp v0.0.0-20221122212121-6b5c0a4cb7fd // indirect
github.com/jpillora/backoff v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/kr/pretty v0.3.0 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.4 // indirect
github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/prometheus/procfs v0.9.0 // indirect
go.uber.org/atomic v1.10.0 // indirect
go.uber.org/goleak v1.2.0 // indirect
golang.org/x/exp v0.0.0-20230124195608-d38c7dcee874 // indirect
golang.org/x/image v0.5.0 // indirect
golang.org/x/lint v0.0.0-20210508222113-6edffad5e616 // indirect
golang.org/x/net v0.7.0 // indirect
golang.org/x/oauth2 v0.5.0 // indirect
golang.org/x/sync v0.1.0 // indirect
golang.org/x/sys v0.5.0 // indirect
golang.org/x/text v0.7.0 // indirect
google.golang.org/appengine v1.6.7 // indirect
google.golang.org/protobuf v1.28.1 // indirect
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
github.com/prometheus/procfs v0.12.0 // indirect
github.com/xhit/go-str2duration/v2 v2.1.0 // indirect
go.uber.org/atomic v1.11.0 // indirect
golang.org/x/exp v0.0.0-20231206192017-f3f8817b8deb // indirect
golang.org/x/image v0.14.0 // indirect
golang.org/x/net v0.19.0 // indirect
golang.org/x/oauth2 v0.15.0 // indirect
golang.org/x/sync v0.5.0 // indirect
golang.org/x/sys v0.15.0 // indirect
golang.org/x/text v0.14.0 // indirect
google.golang.org/appengine v1.6.8 // indirect
google.golang.org/protobuf v1.31.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)
2 changes: 1 addition & 1 deletion go.nix
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{pkgs, ...}: let
go = pkgs.go_1_19;
go = pkgs.go_1_21;
in {
packageOverrides = pkgs: {
buildGoModule = pkgs.buildGoModule.override {go = go;};
Expand Down
Loading

0 comments on commit f5006f4

Please sign in to comment.