declare multiple values in the same switch case

This commit is contained in:
Michael Baird 2017-06-14 09:26:13 -05:00
parent cd532e08cb
commit 87f2940233

View file

@ -506,13 +506,7 @@ func CountOpenFiles() int {
count := 0
switch runtime.GOOS {
case "darwin":
fallthrough
case "linux":
fallthrough
case "unix":
fallthrough
case "freebsd":
case "darwin", "linux", "unix", "freebsd":
// -b option avoid kernel blocks
pid := os.Getpid()
out, err := exec.Command("/bin/sh", "-c", fmt.Sprintf("lsof -b -p %v", pid)).Output()