mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-12-23 21:40:20 +00:00
c313fcd69d
Bumps [k8s.io/klog/v2](https://github.com/kubernetes/klog) from 2.30.0 to 2.40.1. - [Release notes](https://github.com/kubernetes/klog/releases) - [Changelog](https://github.com/kubernetes/klog/blob/main/RELEASE.md) - [Commits](https://github.com/kubernetes/klog/compare/v2.30.0...v2.40.1) --- updated-dependencies: - dependency-name: k8s.io/klog/v2 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
20 lines
241 B
Go
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
|
|
}
|