Skip to content

Commit 40ce965

Browse files
authored
Merge pull request #1812 from mmorel-35/revive/unnecessary-stmt
chore: enable unnecessary-stmt from revive
2 parents 6046372 + f4247f1 commit 40ce965

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

.golangci.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,6 @@ linters-settings:
9191
- name: time-naming
9292
- name: unexported-return
9393
- name: unnecessary-stmt
94-
disabled: true
9594
- name: unreachable-code
9695
- name: unused-parameter
9796
disabled: true

net/net_linux.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -571,8 +571,7 @@ func (p *process) fillFromStatus(ctx context.Context) error {
571571
continue
572572
}
573573
value := tabParts[1]
574-
switch strings.TrimRight(tabParts[0], ":") {
575-
case "Uid":
574+
if strings.TrimRight(tabParts[0], ":") == "Uid" {
576575
p.uids = make([]int32, 0, 4)
577576
for _, i := range strings.Split(value, "\t") {
578577
v, err := strconv.ParseInt(i, 10, 32)

0 commit comments

Comments
 (0)