Skip to content

Commit

Permalink
Apply review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Hipska committed Oct 2, 2024
1 parent 8e6c386 commit 5d9815e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internal/snmp/field.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ func (f *Field) Init(tr Translator) error {
// fieldConvert converts from any type according to the conv specification
func (f *Field) Convert(ent gosnmp.SnmpPDU) (interface{}, error) {
v := ent.Value
var err error

// snmptranslate table field value here
if f.Translate {
Expand Down Expand Up @@ -175,6 +174,7 @@ func (f *Field) Convert(ent gosnmp.SnmpPDU) (interface{}, error) {
}

if f.Conversion == "int" {
var err error
switch vt := v.(type) {
case float32:
v = int64(vt)
Expand Down

0 comments on commit 5d9815e

Please sign in to comment.