mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-04-28 22:25:07 +03:00
added get_user_home_path nethod for other OS
This commit is contained in:
parent
024dddf5a8
commit
6f8a9da19f
1 changed files with 11 additions and 0 deletions
|
@ -3,5 +3,16 @@
|
||||||
|
|
||||||
package main
|
package main
|
||||||
|
|
||||||
|
import "os"
|
||||||
|
|
||||||
|
func get_user_home_path() string {
|
||||||
|
path, exists := os.LookupEnv("HOME")
|
||||||
|
if exists {
|
||||||
|
return path
|
||||||
|
} else {
|
||||||
|
return ""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func Console(show bool) {
|
func Console(show bool) {
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue