mirror of
https://github.com/beego/bee.git
synced 2024-12-22 20:20:49 +00:00
23 lines
353 B
Go
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 ""
|
|
}
|