client_golang/prometheus/testutil
beorn7 0577ef6c57 Improve CollectAndCount
Now that we have also added CollectAndLint and GatherAndLint, I
thought we should bring CollectAndCount in line. So:

- Add GatherAndCount.
- Add filtering by metric name.
- Add tests.

Minor wart: CollectAndCount should now return `(int, error)`, but that
would be a breaking change as the current version just returns
`int`. I decided to let the new version panic when it should return an
error. An error is anyway very unlikely, so the biggest annoyance here
is really just the inconsistency.

Signed-off-by: beorn7 <beorn@grafana.com>
2020-05-14 00:17:45 +02:00
..
promlint Improve various comments 2020-04-25 15:59:53 +02:00
lint.go Improve various comments 2020-04-25 15:59:53 +02:00
lint_test.go Improve various comments 2020-04-25 15:59:53 +02:00
testutil.go Improve CollectAndCount 2020-05-14 00:17:45 +02:00
testutil_test.go Improve CollectAndCount 2020-05-14 00:17:45 +02:00