mirror of
https://github.com/rocky-linux/peridot.git
synced 2024-11-18 19:31:25 +00:00
ad0f7a5305
Upgrade to Go 1.20.5, Hydra v2 SDK, rules-go v0.44.2 (with proper resolves), protobuf v25.3 and mass upgrade of Go dependencies.
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
|
|
}
|