Skip to content

Commit 353b888

Browse files
committed
chore(go/fmt): Fix formatting issues
Signed-off-by: Kemal Akkoyun <[email protected]>
1 parent 7d0c3ce commit 353b888

File tree

9 files changed

+8
-9
lines changed

9 files changed

+8
-9
lines changed

api/prometheus/v1/api_bench_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ func generateData(timeseries, datapoints int) (floatMatrix, histogramMatrix mode
100100
floatMatrix = append(floatMatrix, fss)
101101
histogramMatrix = append(histogramMatrix, hss)
102102
}
103-
return
103+
return floatMatrix, histogramMatrix
104104
}
105105

106106
func BenchmarkSamplesJsonSerialization(b *testing.B) {

internal/github.com/golang/gddo/httputil/header/header.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ loop:
9090
s = skipSpace(s[1:])
9191
}
9292
}
93-
return
93+
return specs
9494
}
9595

9696
func skipSpace(s string) (rest string) {

prometheus/example_clustermanager_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ func (c *ClusterManager) ReallyExpensiveAssessmentOfTheSystemState() (
5353
"foo.example.org": 6.023e23,
5454
"bar.example.org": 3.14,
5555
}
56-
return
56+
return oomCountByHost, ramUsageByHost
5757
}
5858

5959
// ClusterManagerCollector implements the Collector interface.

prometheus/graphite/bridge_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ func stringToLines(s string) (lines []string, err error) {
342342
lines = append(lines, scanner.Text())
343343
}
344344
err = scanner.Err()
345-
return
345+
return lines, err
346346
}
347347

348348
func TestPush(t *testing.T) {

prometheus/promhttp/instrument_server.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ func checkLabels(c prometheus.Collector) (code, method bool) {
366366
panic("metric partitioned with non-supported labels")
367367
}
368368
}
369-
return
369+
return code, method
370370
}
371371

372372
func isLabelCurried(c prometheus.Collector, label string) bool {

prometheus/promhttp/instrument_server_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -324,7 +324,7 @@ func TestLabels(t *testing.T) {
324324
panic("metric partitioned with non-supported labels for this test")
325325
}
326326
}
327-
return
327+
return gotCode, gotMethod
328328
}
329329
equalLabels := func(gotLabels, wantLabels prometheus.Labels) bool {
330330
if len(gotLabels) != len(wantLabels) {

prometheus/summary_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ func getBounds(vars []float64, q, ε float64) (minBound, maxBound float64) {
422422
if upper < len(vars) {
423423
maxBound = vars[upper-1]
424424
}
425-
return
425+
return minBound, maxBound
426426
}
427427

428428
func TestSummaryVecCreatedTimestampWithDeletes(t *testing.T) {

tutorials/whatsup/internal/acceptance_test.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,5 +78,4 @@ func TestAcceptance(t *testing.T) {
7878
if gotErr {
7979
fmt.Println("Got this response from ", fmt.Sprintf("http://localhost:%v", WhatsupPort), ":", metrics)
8080
}
81-
8281
}

tutorials/whatsup/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ func runMain(opts internal.Config) (err error) {
7373
m := http.NewServeMux()
7474
// Create HTTP handler for Prometheus metrics.
7575
// TODO
76-
//m.Handle("/metrics", ...
76+
// m.Handle("/metrics", ...
7777

7878
promClient, err := api.NewClient(api.Config{
7979
Client: &http.Client{Transport: instrumentRoundTripper(nil, "prometheus", http.DefaultTransport)},

0 commit comments

Comments
 (0)