1
0
mirror of https://github.com/beego/bee.git synced 2024-11-10 15:00:54 +00:00
bee/internal/pkg/system/system.go

23 lines
353 B
Go
Raw Normal View History

2020-07-04 14:58:03 +00:00
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 ""
}