Commit Graph

9 Commits

Author SHA1 Message Date
beorn7 b54b73c7b1 Remove spurious commas from links to the docs site
I assume older Nanoc versions rendered the anchors with commas, but
the current doesn't.

Also, this adds the same link to another doc comment where it is also
relevant.

Signed-off-by: beorn7 <beorn@grafana.com>
2020-09-07 22:31:29 +02:00
Tom Wilkie 9c8ba1f945 Review feedback: add comment and tests for WrapRegistererWith.
Signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
2020-06-04 11:51:51 +01:00
Tom Wilkie 8961609f91 Ensure that nil registers are treat as a no-op, even when wrapping.
Signed-off-by: Tom Wilkie <tom.wilkie@gmail.com>
2020-06-04 10:30:51 +01:00
beorn7 dba1478b8a Add lint:ignore for protobuf deprecation
`github.com/golang/protobuf/proto` is deprecated in lieu of
`google.golang.org/protobuf/proto`. However, we cannot simply
migrate. Types from the proto package are exposed to users of packages
in this repo. If we migrate here, users have to migrate to. Thus, we
could only migrate with a major version bump.

In different news, with all the inline lint:ignore comments, including
the existing ones, there is no need to repeat the exception in the
Makefile.

A current version of `staticcheck` is happy with the code after this
commit. golangci-lint is broken at the moment, however, and ignores
the lint:ignore comments in the code as well as those via envvar.

Signed-off-by: beorn7 <beorn@grafana.com>
2020-05-14 20:11:22 +02:00
beorn7 2f3a0f8f2e Make the AlreadyRegisteredError useful for wrapped registries
Signed-off-by: beorn7 <beorn@grafana.com>
2019-06-14 17:55:35 +02:00
beorn7 fe28f32433 Discourage prefixing every metris with WrapRegistererWithPrefix
Signed-off-by: beorn7 <beorn@soundcloud.com>
2018-09-14 11:59:13 +02:00
beorn7 cf9b2a8c78 Rename WrapWith... to WrapRegistererWith...
Signed-off-by: beorn7 <beorn@soundcloud.com>
2018-09-13 17:43:05 +02:00
beorn7 837c7cb1f4 Update Collector example
It now uses the new WrapWith function instead of ConstLabels. Describe
is now implemented via DescribeByCollect.

Signed-off-by: beorn7 <beorn@soundcloud.com>
2018-09-12 15:34:13 +02:00
beorn7 84d7aa0cd9 Add wrapping of Registerers with labels and prefix
Essentially middleware for Registerers!

Signed-off-by: beorn7 <beorn@soundcloud.com>
2018-09-12 15:34:07 +02:00