Simplify if expr in ExampleNewExpvarCollector()
Signed-off-by: Karsten Weiss <knweiss@gmail.com>
This commit is contained in:
parent
587d5265f8
commit
245fde70cb
|
@ -78,7 +78,7 @@ func ExampleNewExpvarCollector() {
|
||||||
close(metricChan)
|
close(metricChan)
|
||||||
}()
|
}()
|
||||||
for m := range metricChan {
|
for m := range metricChan {
|
||||||
if strings.Index(m.Desc().String(), "expvar_memstats") == -1 {
|
if !strings.Contains(m.Desc().String(), "expvar_memstats") {
|
||||||
metric.Reset()
|
metric.Reset()
|
||||||
m.Write(&metric)
|
m.Write(&metric)
|
||||||
metricStrings = append(metricStrings, metric.String())
|
metricStrings = append(metricStrings, metric.String())
|
||||||
|
|
Loading…
Reference in New Issue