Skip to content

Commit 4d39083

Browse files
committed
net: fix gocritic emptyStringTest lint on AIX
1 parent 433c6d5 commit 4d39083

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

net/net_aix.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ func parseNetstatS(output string, protocols []string) ([]ProtoCountersStat, erro
5252
sections := make(map[string][]string)
5353
var currentProto string
5454
for _, line := range strings.Split(output, "\n") {
55-
if len(line) > 0 && line[0] != '\t' && line[0] != ' ' && strings.HasSuffix(strings.TrimSpace(line), ":") {
55+
if line != "" && line[0] != '\t' && line[0] != ' ' && strings.HasSuffix(strings.TrimSpace(line), ":") {
5656
currentProto = strings.TrimSuffix(strings.TrimSpace(line), ":")
5757
continue
5858
}

0 commit comments

Comments
 (0)