Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(linters): Enable import-alias-naming and redundant-import-alias rules for revive #15836

Open
wants to merge 16 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge remote-tracking branch 'upstream/master' into revive_import-ali…
…as-naming_redundant-import-alias

# Conflicts:
#	plugins/inputs/aerospike/aerospike.go
#	plugins/inputs/gnmi/gnmi.go
  • Loading branch information
zak-pawel committed Sep 16, 2024
commit e8de3a45070cc07cab1af6ac6a8c4f3f93d5a82b
17 changes: 2 additions & 15 deletions plugins/inputs/aerospike/aerospike.go
Original file line number Diff line number Diff line change
Expand Up @@ -326,14 +326,7 @@ func (a *Aerospike) parseSetInfo(acc telegraf.Accumulator, stats map[string]stri
acc.AddFields("aerospike_set", nFields, nTags, time.Now())
}

func (a *Aerospike) getTTLHistogram(
acc telegraf.Accumulator,
hostPort string,
namespace string,
set string,
n *as.Node,
infoPolicy *as.InfoPolicy,
) error {
func (a *Aerospike) getTTLHistogram(acc telegraf.Accumulator, hostPort, namespace, set string, n *as.Node, infoPolicy *as.InfoPolicy) error {
stats, err := a.getHistogram(namespace, set, "ttl", n, infoPolicy)
if err != nil {
return err
Expand All @@ -357,13 +350,7 @@ func (a *Aerospike) getObjectSizeLinearHistogram(acc telegraf.Accumulator, hostP
return nil
}

func (a *Aerospike) getHistogram(
namespace string,
set string,
histogramType string,
n *as.Node,
infoPolicy *as.InfoPolicy,
) (map[string]string, error) {
func (a *Aerospike) getHistogram(namespace, set, histogramType string, n *as.Node, infoPolicy *as.InfoPolicy) (map[string]string, error) {
var queryArg string
if len(set) > 0 {
queryArg = fmt.Sprintf("histogram:type=%s;namespace=%v;set=%v", histogramType, namespace, set)
Expand Down
2 changes: 1 addition & 1 deletion plugins/inputs/gnmi/gnmi.go
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ func (c *GNMI) newSubscribeRequest() (*gnmi.SubscribeRequest, error) {
}

// ParsePath from XPath-like string to gNMI path structure
func parsePath(origin string, pathToParse string, target string) (*gnmi.Path, error) {
func parsePath(origin, pathToParse, target string) (*gnmi.Path, error) {
gnmiPath, err := xpath.ToGNMIPath(pathToParse)
if err != nil {
return nil, err
Expand Down
Loading
You are viewing a condensed version of this merge commit. You can view the full changes here.