Skip to content
Prev Previous commit
Next Next commit
chore: Add deprecation comment
  • Loading branch information
Hipska committed Oct 2, 2024
commit 8e6c386cacfe9b58430f09e6d1154840f487cde2
2 changes: 2 additions & 0 deletions internal/snmp/field.go
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,7 @@ func (f *Field) Convert(ent gosnmp.SnmpPDU) (interface{}, error) {
return v, err
}

// Deprecated: Use displayhint instead
if f.Conversion == "hwaddr" {
switch vt := v.(type) {
case string:
Expand Down Expand Up @@ -308,6 +309,7 @@ func (f *Field) Convert(ent gosnmp.SnmpPDU) (interface{}, error) {
return f.translator.SnmpFormatEnum(ent.Name, ent.Value, false)
}

// Deprecated: Use displayhint instead
if f.Conversion == "enum(1)" {
return f.translator.SnmpFormatEnum(ent.Name, ent.Value, true)
}
Expand Down
Loading