init
This commit is contained in:
parent
f1c565335d
commit
bccfdba267
14
cli/cli.go
14
cli/cli.go
@ -89,14 +89,18 @@ func Run() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const (
|
||||||
|
homeEnv = "J_HOME"
|
||||||
|
mirrorEnv = "J_MIRROR"
|
||||||
|
)
|
||||||
|
|
||||||
// ghome 返回g根目录
|
// ghome 返回g根目录
|
||||||
func ghome() (dir string) {
|
func ghome() (dir string) {
|
||||||
/* if experimental := os.Getenv(experimentalEnv); experimental == "true" {
|
//fmt.Println(os.Getenv(homeEnv))
|
||||||
if dir = os.Getenv(homeEnv); dir != "" {
|
if dir = os.Getenv(homeEnv); dir != "" {
|
||||||
return dir
|
return dir
|
||||||
}
|
|
||||||
}
|
}
|
||||||
homeDir, _ := os.UserHomeDir()
|
/* homeDir, _ := os.UserHomeDir()
|
||||||
return filepath.Join(homeDir, ".g") */
|
return filepath.Join(homeDir, ".g") */
|
||||||
path, _ := os.Getwd()
|
path, _ := os.Getwd()
|
||||||
return path
|
return path
|
||||||
|
Loading…
x
Reference in New Issue
Block a user