csi-driver-nfs/vendor/k8s.io/klog/v2/klog_file_others.go
andyzhangx 9058c86fd8 chore: vendor latest mount-utils lib
chore: vendor latest mount-utils lib
2023-01-08 02:44:33 +00:00

20 lines
241 B
Go

//go:build !windows
// +build !windows
package klog
import (
"os/user"
)
func getUserName() string {
userNameOnce.Do(func() {
current, err := user.Current()
if err == nil {
userName = current.Username
}
})
return userName
}