This commit is contained in:
Bel LaPointe
2026-03-09 09:42:09 -06:00
parent 287256a20d
commit 886c4aabff
1767 changed files with 6581574 additions and 0 deletions

25
vendor/github.com/lib/pq/internal/pqutil/user_posix.go generated vendored Normal file
View File

@@ -0,0 +1,25 @@
//go:build !windows && !js && !android && !hurd && !zos && !wasip1 && !appengine
package pqutil
import (
"os"
"os/user"
"runtime"
)
func User() (string, error) {
env := "USER"
if runtime.GOOS == "plan9" {
env = "user"
}
if n := os.Getenv(env); n != "" {
return n, nil
}
u, err := user.Current()
if err != nil {
return "", err
}
return u.Username, nil
}