Skip to content

Commit

Permalink
Fix issues detected by golanci-lint
Browse files Browse the repository at this point in the history
See,
$ golangci-lint run
collector/collector.go:453:5: ineffectual assignment to `instance` (ineffassign)
				instance = ""
				^
collector/collector.go:330:12: S1005: unnecessary assignment to the blank identifier (gosimple)
		for idx, _ := range data {
		         ^

Signed-off-by: Mario Trangoni <mjtrangoni@gmail.com>
  • Loading branch information
mjtrangoni committed Mar 8, 2020
1 parent 3c61c04 commit 24dccfd
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions collector/collector.go
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ func (k *KACollector) text() ([]KAStats, error) {
}

if len(data) == len(stats) {
for idx, _ := range data {
for idx := range data {
st := KAStats{}
st.Data = data[idx]
st.Stats = stats[idx]
Expand Down Expand Up @@ -450,7 +450,6 @@ func (k *KACollector) parseStats() ([]Stats, error) {
if instance != "" {
data = append(data, dt)
dt = Stats{}
instance = ""
}

sp := strings.Split(strings.TrimSpace(line), prop)
Expand Down

0 comments on commit 24dccfd

Please sign in to comment.