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

支持go mod

This commit is contained in:
qiantao
2020-05-22 15:53:22 +08:00
parent 6a86284cec
commit fbfa51046a
2 changed files with 55 additions and 11 deletions

View File

@ -29,10 +29,18 @@ import (
"time"
"unicode"
beeLogger "github.com/beego/bee/logger"
"github.com/beego/bee/logger"
"github.com/beego/bee/logger/colors"
)
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 {