cert-manager-webhook-example/vendor/k8s.io/klog/v2/klog_file_others.go
Konstantin Kalugin-Balashov 752d8d74da Initial
2024-02-28 13:20:51 +07:00

19 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
}