mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-08-28 10:54:59 +00:00
declare multiple values in the same switch case
This commit is contained in:
parent
cd532e08cb
commit
87f2940233
1 changed files with 1 additions and 7 deletions
|
|
@ -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()
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue