diff --git a/internal/process/process.go b/internal/process/process.go index acd8a424709b6..91e0f78b36160 100644 --- a/internal/process/process.go +++ b/internal/process/process.go @@ -195,5 +195,6 @@ func isQuitting(ctx context.Context) bool { } func defaultReadPipe(r io.Reader) { + //nolint:errcheck // Discarding the data, no need to handle an error _, _ = io.Copy(io.Discard, r) } diff --git a/internal/snmp/field.go b/internal/snmp/field.go index ff101d8023878..dd55b2611e7ad 100644 --- a/internal/snmp/field.go +++ b/internal/snmp/field.go @@ -146,6 +146,7 @@ func (f *Field) Convert(ent gosnmp.SnmpPDU) (v interface{}, err error) { if f.Conversion == "int" { v = ent.Value + err = nil switch vt := v.(type) { case float32: v = int64(vt) @@ -172,11 +173,11 @@ func (f *Field) Convert(ent gosnmp.SnmpPDU) (v interface{}, err error) { case uint64: v = int64(vt) case []byte: - v, _ = strconv.ParseInt(string(vt), 10, 64) + v, err = strconv.ParseInt(string(vt), 10, 64) case string: - v, _ = strconv.ParseInt(vt, 10, 64) + v, err = strconv.ParseInt(vt, 10, 64) } - return v, nil + return v, err } if f.Conversion == "hwaddr" {