From f4247f1c018650d49893fb2ac58bc18b492e0789 Mon Sep 17 00:00:00 2001 From: Matthieu MOREL Date: Sun, 23 Feb 2025 11:15:12 +0100 Subject: [PATCH] chore: enable unnecessary-stmt from revive Signed-off-by: Matthieu MOREL --- .golangci.yml | 1 - net/net_linux.go | 3 +-- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index 9229c09..535f93e 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -91,7 +91,6 @@ linters-settings: - name: time-naming - name: unexported-return - name: unnecessary-stmt - disabled: true - name: unreachable-code - name: unused-parameter disabled: true diff --git a/net/net_linux.go b/net/net_linux.go index 6072965..fc351ee 100644 --- a/net/net_linux.go +++ b/net/net_linux.go @@ -571,8 +571,7 @@ func (p *process) fillFromStatus(ctx context.Context) error { continue } value := tabParts[1] - switch strings.TrimRight(tabParts[0], ":") { - case "Uid": + if strings.TrimRight(tabParts[0], ":") == "Uid" { p.uids = make([]int32, 0, 4) for _, i := range strings.Split(value, "\t") { v, err := strconv.ParseInt(i, 10, 32)