1
0
mirror of https://github.com/beego/bee.git synced 2025-07-01 17:20:17 +00:00

bee genenrate

This commit is contained in:
qiantao
2020-05-24 12:59:02 +08:00
parent 8360965cc7
commit 92de521f36
3 changed files with 43 additions and 24 deletions

View File

@ -41,6 +41,14 @@ func GetBeeWorkPath() string {
return beePath
}
func GetBeeWorkPath() string {
beePath, err := filepath.Abs(filepath.Dir(os.Args[0]))
if err != nil {
panic(err)
}
return beePath
}
// Go is a basic promise implementation: it wraps calls a function in a goroutine
// and returns a channel which will later return the function's return value.
func Go(f func() error) chan error {