mirror of
https://github.com/beego/bee.git
synced 2025-06-11 08:20:39 +00:00
beego pro init
This commit is contained in:
22
internal/pkg/system/system.go
Normal file
22
internal/pkg/system/system.go
Normal file
@ -0,0 +1,22 @@
|
||||
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 ""
|
||||
}
|
Reference in New Issue
Block a user