10000 helper.go: removing unused member Name of variable struct by it1804 · Pull Request #338 · gosnmp/gosnmp · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

helper.go: removing unused member Name of variable struct #338

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

Merged
merged 1 commit into from
Oct 7, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
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
6 changes: 3 additions & 3 deletions gosnmp.go
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ func (x *GoSNMP) Get(oids []string) (result *SnmpPacket, err error) {
oidCount, x.MaxOids)
}
// convert oids slice to pdu slice
var pdus []SnmpPDU
pdus := make([]SnmpPDU, 0, oidCount)
for _, oid := range oids {
pdus = append(pdus, SnmpPDU{Name: oid, Type: Null, Value: nil})
}
Expand Down Expand Up @@ -433,7 +433,7 @@ func (x *GoSNMP) GetNext(oids []string) (result *SnmpPacket, err error) {
}

// convert oids slice to pdu slice
var pdus []SnmpPDU
pdus := make([]SnmpPDU, 0, oidCount)
for _, oid := range oids {
pdus = append(pdus, SnmpPDU{Name: oid, Type: Null, Value: nil})
}
Expand All @@ -458,7 +458,7 @@ func (x *GoSNMP) GetBulk(oids []string, nonRepeaters uint8, maxRepetitions uint3
}

// convert oids slice to pdu slice
var pdus []SnmpPDU
pdus := make([]SnmpPDU, 0, oidCount)
for _, oid := range oids {
pdus = append(pdus, SnmpPDU{Name: oid, Type: Null, Value: nil})
}
Expand Down
3 changes: 1 addition & 2 deletions helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,9 @@ import (
"strconv"
)

// variable struct is used by decodeValue(), which is used for debugging
// variable struct is used by decodeValue()
type variable struct {
Value interface{}
Name []int
Type Asn1BER
}

Expand Down
0