1
0
mirror of https://github.com/beego/bee.git synced 2024-10-30 01:40:53 +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 ""
}