Fix a few typos / grammatical errors in the Godoc comments for promauto.
Only trivial stuff but slightly helps readability of the docs.
Signed-off-by: Chris Banks <chris.banks@digital.cabinet-office.gov.uk>
* Indent example in godoc consistently
Signed-off-by: Jon Kartago Lamida <me@lamida.net>
* Add missed one line indentation fix
Signed-off-by: Jon Kartago Lamida <me@lamida.net>
---------
Signed-off-by: Jon Kartago Lamida <me@lamida.net>
* Add new Go 1.19 metrics
Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>
* Format files with the latest formatter
Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>
Signed-off-by: Kemal Akkoyun <kakkoyun@gmail.com>
The wording of the documentation is slightly misleading. Before this
commit, it says that the returned collectors are "already registered".
This could be interpreted in two ways, one could think that promauto
keeps some sort of cache of already registered Collectors that are
returned by this package, and the other way is that the Collectors
constructed are registered before being returned. What is actually
happening is the latter, and the wording after this PR leaves no room to
think that the former could be the case.
Signed-off-by: Rafael Franco <me@rafaelfranco.es>
Signed-off-by: Rafael Franco <me@rafaelfranco.es>
Also, update the package documentation. The concerns about the global
registry aren't really valid anymore because promauto now also works
with custom registries.
The musings about the http.DefaultMux are more a digression and
shouldn't be in a doc comment.
Signed-off-by: beorn7 <beorn@grafana.com>
Finally, I found an easy solution to provide the "evil"
auto-registration without getting death threats from the wardens of Go
purity. The reasoning can be found in the package's doc comment.