Skip to content

Commit

Permalink
Use golang 1.19 and bump libraries (#76)
Browse files Browse the repository at this point in the history
* Use golang 1.19 and bump libraries

* Add Makefile
  • Loading branch information
nitrocode authored Dec 19, 2022
1 parent 7a572ea commit b7e3bda
Show file tree
Hide file tree
Showing 5 changed files with 420 additions and 46 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
*.dll
*.so
*.dylib
cloudflare_exporter

# Test binary, built with `go test -c`
*.test
Expand All @@ -23,4 +24,4 @@ vendor/
# editors
*.swp

.idea/
.idea/
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.PHONY: build
build:
CGO_ENABLED=0 go build -o cloudflare_exporter .
2 changes: 1 addition & 1 deletion cloudflare.go
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ func fetchAccounts() []cloudflare.Account {
}

ctx := context.Background()
a, _, err := api.Accounts(ctx, cloudflare.PaginationOptions{PerPage: 100})
a, _, err := api.Accounts(ctx, cloudflare.AccountsListParams{PaginationOptions: cloudflare.PaginationOptions{PerPage: 100}})
if err != nil {
log.Fatal(err)
}
Expand Down
32 changes: 26 additions & 6 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,14 +1,34 @@
module github.com/lablabs/cloudflare-exporter

go 1.15
go 1.19

require (
github.com/biter777/countries v1.3.2
github.com/cloudflare/cloudflare-go v0.25.0
github.com/biter777/countries v1.5.6
github.com/cloudflare/cloudflare-go v0.49.0
github.com/machinebox/graphql v0.2.2
github.com/matryer/is v1.4.0 // indirect
github.com/namsral/flag v1.7.4-pre
github.com/nelkinda/health-go v0.0.1
github.com/prometheus/client_golang v1.7.1
github.com/sirupsen/logrus v1.7.0
github.com/prometheus/client_golang v1.13.0
github.com/sirupsen/logrus v1.9.0
)

require (
github.com/beorn7/perks v1.0.1 // indirect
github.com/cespare/xxhash/v2 v2.1.2 // indirect
github.com/golang/protobuf v1.5.2 // indirect
github.com/google/go-querystring v1.1.0 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
github.com/hashicorp/go-retryablehttp v0.7.1 // indirect
github.com/matryer/is v1.4.0 // indirect
github.com/matttproud/golang_protobuf_extensions v1.0.1 // indirect
github.com/nelkinda/http-go v0.0.1 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/prometheus/client_model v0.2.0 // indirect
github.com/prometheus/common v0.37.0 // indirect
github.com/prometheus/procfs v0.8.0 // indirect
golang.org/x/net v0.0.0-20220909164309-bea034e7d591 // indirect
golang.org/x/sys v0.0.0-20220913175220-63ea55921009 // indirect
golang.org/x/text v0.3.7 // indirect
golang.org/x/time v0.0.0-20220722155302-e5dcc9cfc0b9 // indirect
google.golang.org/protobuf v1.28.1 // indirect
)
Loading

0 comments on commit b7e3bda

Please sign in to comment.