Simplify if expr in ExampleNewExpvarCollector()

Signed-off-by: Karsten Weiss <knweiss@gmail.com>
This commit is contained in:
Karsten Weiss 2018-04-13 22:28:16 +02:00
parent 587d5265f8
commit 245fde70cb
1 changed files with 1 additions and 1 deletions

View File

@ -78,7 +78,7 @@ func ExampleNewExpvarCollector() {
close(metricChan)
}()
for m := range metricChan {
if strings.Index(m.Desc().String(), "expvar_memstats") == -1 {
if !strings.Contains(m.Desc().String(), "expvar_memstats") {
metric.Reset()
m.Write(&metric)
metricStrings = append(metricStrings, metric.String())