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