[net][linux]: remove unused files. go1.11 is not supported now.

pull/1628/head
shirou 1 year ago
parent e9591b5b01
commit 5cd488ff30

@ -552,7 +552,7 @@ func getProcInodes(root string, pid int32, max int) (map[string][]inodeMap, erro
return ret, err
}
defer f.Close()
dirEntries, err := readDir(f, max)
dirEntries, err := f.ReadDir(max)
if err != nil {
return ret, err
}

@ -1,12 +0,0 @@
// SPDX-License-Identifier: BSD-3-Clause
//go:build !go1.16
package net
import (
"os"
)
func readDir(f *os.File, max int) ([]os.FileInfo, error) {
return f.Readdir(max)
}

@ -1,12 +0,0 @@
// SPDX-License-Identifier: BSD-3-Clause
//go:build go1.16
package net
import (
"os"
)
func readDir(f *os.File, max int) ([]os.DirEntry, error) {
return f.ReadDir(max)
}

@ -1,20 +0,0 @@
// SPDX-License-Identifier: BSD-3-Clause
//go:build linux
package net
import "testing"
func BenchmarkGetConnectionsInet(b *testing.B) {
b.ResetTimer()
for i := 0; i < b.N; i++ {
Connections("inet")
}
}
func BenchmarkGetConnectionsAll(b *testing.B) {
b.ResetTimer()
for i := 0; i < b.N; i++ {
Connections("all")
}
}
Loading…
Cancel
Save