File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4343 run : go vet ./...
4444
4545 - name : Install staticcheck
46- run : GOBIN=$PWD/.bin go install honnef.co/go/tools/cmd/staticcheck@latest
46+ run : GOBIN=$PWD/.bin go install honnef.co/go/tools/cmd/staticcheck@v0.7.0
4747
4848 - name : Staticcheck
4949 run : ./.bin/staticcheck ./...
Original file line number Diff line number Diff line change 4545 run : go vet ./...
4646
4747 - name : Install staticcheck
48- run : GOBIN=$PWD/.bin go install honnef.co/go/tools/cmd/staticcheck@latest
48+ run : GOBIN=$PWD/.bin go install honnef.co/go/tools/cmd/staticcheck@v0.7.0
4949
5050 - name : Staticcheck
5151 run : ./.bin/staticcheck ./...
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ const (
1515 metricsEntryPointAddr = "127.0.0.1:9100"
1616)
1717
18+ // Whole-number buckets must be ints to match yaml.v3's decoded types.
1819var prometheusLatencyBuckets = []interface {}{
1920 0.005 ,
2021 0.01 ,
Original file line number Diff line number Diff line change @@ -53,11 +53,12 @@ func TestEnsurePrometheusMetricsConfigIsStable(t *testing.T) {
5353 if err != nil {
5454 t .Fatalf ("failed to marshal config: %v" , err )
5555 }
56- if err := yaml .Unmarshal (data , & config ); err != nil {
56+ var roundTripped map [string ]interface {}
57+ if err := yaml .Unmarshal (data , & roundTripped ); err != nil {
5758 t .Fatalf ("failed to unmarshal config: %v" , err )
5859 }
5960
60- if ensurePrometheusMetricsConfig (config ) {
61+ if ensurePrometheusMetricsConfig (roundTripped ) {
6162 t .Fatal ("expected second call to be stable" )
6263 }
6364}
You can’t perform that action at this time.
0 commit comments