1
0
mirror of https://github.com/beego/bee.git synced 2024-11-01 05:00:55 +00:00
bee/internal/pkg/system/system.go
2020-07-04 22:58:03 +08:00

23 lines
353 B
Go

package system
import (
"os"
"os/user"
"path/filepath"
)
// Bee System Params ...
var (
Usr, _ = user.Current()
BeegoHome = filepath.Join(Usr.HomeDir, "/.beego")
CurrentDir = getCurrentDirectory()
GoPath = os.Getenv("GOPATH")
)
func getCurrentDirectory() string {
if dir, err := os.Getwd(); err == nil {
return dir
}
return ""
}