Skip to content

Commit 6183840

Browse files
author
Shashank Sinha
authored
Update comments for gotip (#482)
Comment format has been updated after Go 1.18, which is reflected in tip version of Golang. This patch updates comments to be compliant with new format.
1 parent f2de1b1 commit 6183840

File tree

3 files changed

+16
-13
lines changed

3 files changed

+16
-13
lines changed

exporter/common.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,10 @@ func listCollections(ctx context.Context, client *mongo.Client, database string,
6868

6969
// databases returns the list of databases matching the filters.
7070
// - filterInNamespaces: Include only the database names matching the any of the regular expressions in this list.
71-
// Case will be ignored because the function will automatically add the ignore case
72-
// flag to the regular expression.
71+
//
72+
// Case will be ignored because the function will automatically add the ignore case
73+
// flag to the regular expression.
74+
//
7375
// - exclude: List of databases to be excluded. Useful to ignore system databases.
7476
func databases(ctx context.Context, client *mongo.Client, filterInNamespaces []string, exclude []string) ([]string, error) {
7577
opts := &options.ListDatabasesOptions{NameOnly: pointer.ToBool(true), AuthorizedDatabases: pointer.ToBool(true)}

exporter/v1_compatibility.go

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -121,16 +121,17 @@ func newToOldMetric(rm *rawMetric, c conversion) *rawMetric {
121121
// should be converted to mongodb_mongod_wiredtiger_cache_bytes with label "type": "total".
122122
// For this conversion, we have the suffixMapping field that holds the mapping for all suffixes.
123123
// Example definition:
124-
// oldName: "mongodb_mongod_wiredtiger_cache_bytes",
125-
// prefix: "mongodb_ss_wt_cache_bytes",
126-
// suffixLabel: "type",
127-
// suffixMapping: map[string]string{
128-
// "bytes_currently_in_the_cache": "total",
129-
// "tracked_dirty_bytes_in_the_cache": "dirty",
130-
// "tracked_bytes_belonging_to_internal_pages_in_the_cache": "internal_pages",
131-
// "tracked_bytes_belonging_to_leaf_pages_in_the_cache": "internal_pages",
132-
// },
133-
// },
124+
//
125+
// oldName: "mongodb_mongod_wiredtiger_cache_bytes",
126+
// prefix: "mongodb_ss_wt_cache_bytes",
127+
// suffixLabel: "type",
128+
// suffixMapping: map[string]string{
129+
// "bytes_currently_in_the_cache": "total",
130+
// "tracked_dirty_bytes_in_the_cache": "dirty",
131+
// "tracked_bytes_belonging_to_internal_pages_in_the_cache": "internal_pages",
132+
// "tracked_bytes_belonging_to_leaf_pages_in_the_cache": "internal_pages",
133+
// },
134+
// },
134135
func createOldMetricFromNew(rm *rawMetric, c conversion) *rawMetric {
135136
suffix := strings.TrimPrefix(rm.fqName, c.prefix)
136137
suffix = strings.TrimPrefix(suffix, "_")

internal/tu/docker_inspect.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ type HostPort struct {
2323
HostPort string `json:"HostPort"`
2424
}
2525

26-
//nolint
26+
// nolint
2727
type DockerInspectOutput []struct {
2828
ID string `json:"Id"`
2929
Created time.Time `json:"Created"`

0 commit comments

Comments
 (0)