vendor: update all dependencies
This commit is contained in:
parent
3f0789e2db
commit
08021c4636
2474 changed files with 435818 additions and 282709 deletions
17
vendor/github.com/pengsrc/go-shared/utils/home.go
generated
vendored
Normal file
17
vendor/github.com/pengsrc/go-shared/utils/home.go
generated
vendored
Normal file
|
@ -0,0 +1,17 @@
|
|||
package utils
|
||||
|
||||
import (
|
||||
"os"
|
||||
"runtime"
|
||||
)
|
||||
|
||||
// GetHome returns the home directory.
|
||||
func GetHome() string {
|
||||
if runtime.GOOS == "windows" {
|
||||
home := os.Getenv("HOMEDRIVE") + os.Getenv("HOMEPATH")
|
||||
if home == "" {
|
||||
home = os.Getenv("USERPROFILE")
|
||||
}
|
||||
}
|
||||
return os.Getenv("HOME")
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue