// CollectAndLint registers the provided Collector with a newly created pedantic // Registry. It then calls GatherAndLint with that Registry and with the // provided metricNames. func CollectAndLint(c prometheus.Collector, metricNames ...string) ([]promlint.Problem, error) { … } // GatherAndLint gathers all metrics from the provided Gatherer and checks them // with the linter in the promlint package. If any metricNames are provided, // only metrics with those names are checked. func GatherAndLint(g prometheus.Gatherer, metricNames ...string) ([]promlint.Problem, error) { … }