mirror of
https://github.com/shirou/gopsutil.git
synced 2025-04-28 13:48:49 +08:00
Merge pull request #583 from Quasilyte/quasilyte/emptyFallthrough
net: use multi-value case clause instead of fallthrough
This commit is contained in:
commit
3773c0ebf0
@ -395,9 +395,7 @@ func statsFromInodes(root string, pid int32, tmap []netConnectionKindType, inode
|
|||||||
var ls []connTmp
|
var ls []connTmp
|
||||||
path = fmt.Sprintf("%s/net/%s", root, t.filename)
|
path = fmt.Sprintf("%s/net/%s", root, t.filename)
|
||||||
switch t.family {
|
switch t.family {
|
||||||
case syscall.AF_INET:
|
case syscall.AF_INET, syscall.AF_INET6:
|
||||||
fallthrough
|
|
||||||
case syscall.AF_INET6:
|
|
||||||
ls, err = processInet(path, t, inodes, pid)
|
ls, err = processInet(path, t, inodes, pid)
|
||||||
case syscall.AF_UNIX:
|
case syscall.AF_UNIX:
|
||||||
ls, err = processUnix(path, t, inodes, pid)
|
ls, err = processUnix(path, t, inodes, pid)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user