Fix golint issues for pkg/util/rlimit
pkg/util/rlimit/rlimit_linux.go:25:1: exported function RlimitNumFiles should have comment or be unexported pkg/util/rlimit/rlimit_linux.go:25:6: func name will be used as rlimit.RlimitNumFiles by other packages, and that stutters; consider calling this NumFiles pkg/util/rlimit/rlimit_unsupported.go:25:1: exported function RlimitNumFiles should have comment or be unexported pkg/util/rlimit/rlimit_unsupported.go:25:6: func name will be used as rlimit.RlimitNumFiles by other packages, and that stutters; consider calling this NumFiles Ref: https://github.com/kubernetes/kubernetes/issues/68026
This commit is contained in:
@@ -22,6 +22,7 @@ import (
|
||||
"golang.org/x/sys/unix"
|
||||
)
|
||||
|
||||
func RlimitNumFiles(maxOpenFiles uint64) error {
|
||||
// SetNumFiles sets the linux rlimit for the maximum open files.
|
||||
func SetNumFiles(maxOpenFiles uint64) error {
|
||||
return unix.Setrlimit(unix.RLIMIT_NOFILE, &unix.Rlimit{Max: maxOpenFiles, Cur: maxOpenFiles})
|
||||
}
|
||||
|
Reference in New Issue
Block a user