mirror of
https://github.com/rclone/rclone.git
synced 2025-12-19 01:33:25 +00:00
vendor: update all dependencies
This commit is contained in:
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")
|
||||
}
|
||||
Reference in New Issue
Block a user