Skip to content

Commit

Permalink
Deprecated comment should begin with "Deprecated:" (#1347)
Browse files Browse the repository at this point in the history
See https://go.dev/blog/godoc

Signed-off-by: Oleksandr Redko <Oleksandr_Redko@epam.com>
  • Loading branch information
alexandear authored Sep 21, 2023
1 parent bbab8fe commit 1bae6c1
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions prometheus/collectors/go_collector_latest.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,16 +132,19 @@ type GoCollectionOption uint32

const (
// GoRuntimeMemStatsCollection represents the metrics represented by runtime.MemStats structure.
// Deprecated. Use WithGoCollectorMemStatsMetricsDisabled() function to disable those metrics in the collector.
//
// Deprecated: Use WithGoCollectorMemStatsMetricsDisabled() function to disable those metrics in the collector.
GoRuntimeMemStatsCollection GoCollectionOption = 1 << iota
// GoRuntimeMetricsCollection is the new set of metrics represented by runtime/metrics package.
// Deprecated. Use WithGoCollectorRuntimeMetrics(GoRuntimeMetricsRule{Matcher: regexp.MustCompile("/.*")})
//
// Deprecated: Use WithGoCollectorRuntimeMetrics(GoRuntimeMetricsRule{Matcher: regexp.MustCompile("/.*")})
// function to enable those metrics in the collector.
GoRuntimeMetricsCollection
)

// WithGoCollections allows enabling different collections for Go collector on top of base metrics.
// Deprecated. Use WithGoCollectorRuntimeMetrics() and WithGoCollectorMemStatsMetricsDisabled() instead to control metrics.
//
// Deprecated: Use WithGoCollectorRuntimeMetrics() and WithGoCollectorMemStatsMetricsDisabled() instead to control metrics.
func WithGoCollections(flags GoCollectionOption) func(options *internal.GoCollectorOptions) {
return func(options *internal.GoCollectorOptions) {
if flags&GoRuntimeMemStatsCollection == 0 {
Expand Down

0 comments on commit 1bae6c1

Please sign in to comment.