Make more sence to go.
tuanjie
8 years ago
4 | 4 | // NewMultiCounter returns a wrapper around multiple Counters. |
5 | 5 | func NewMultiCounter(counters ...Counter) Counter { |
6 | 6 | c := make(multiCounter, 0, len(counters)) |
7 | for _, counter := range counters { | |
8 | c = append(c, counter) | |
9 | } | |
10 | return c | |
7 | return append(c, counters...) | |
11 | 8 | } |
12 | 9 | |
13 | 10 | func (c multiCounter) With(f Field) Counter { |
29 | 26 | // NewMultiGauge returns a wrapper around multiple Gauges. |
30 | 27 | func NewMultiGauge(gauges ...Gauge) Gauge { |
31 | 28 | g := make(multiGauge, 0, len(gauges)) |
32 | for _, gauge := range gauges { | |
33 | g = append(g, gauge) | |
34 | } | |
35 | return g | |
29 | return append(g, gauges...) | |
36 | 30 | } |
37 | 31 | |
38 | 32 | func (g multiGauge) With(f Field) Gauge { |
60 | 54 | // NewMultiHistogram returns a wrapper around multiple Histograms. |
61 | 55 | func NewMultiHistogram(histograms ...Histogram) Histogram { |
62 | 56 | h := make(multiHistogram, 0, len(histograms)) |
63 | for _, histogram := range histograms { | |
64 | h = append(h, histogram) | |
65 | } | |
66 | return h | |
57 | return append(h, histograms...) | |
67 | 58 | } |
68 | 59 | |
69 | 60 | func (h multiHistogram) With(f Field) Histogram { |