mirror of
https://github.com/beego/bee.git
synced 2025-06-13 17:00:39 +00:00
beego pro init
This commit is contained in:
20
internal/app/module/beegopro/config.go
Normal file
20
internal/app/module/beegopro/config.go
Normal file
@ -0,0 +1,20 @@
|
||||
package beegopro
|
||||
|
||||
import (
|
||||
"github.com/beego/bee/internal/pkg/utils"
|
||||
beeLogger "github.com/beego/bee/logger"
|
||||
"io/ioutil"
|
||||
)
|
||||
|
||||
func (c *Container) GenConfig() {
|
||||
if utils.IsExist(c.BeegoProFile) {
|
||||
beeLogger.Log.Fatalf("beego pro toml exist")
|
||||
return
|
||||
}
|
||||
|
||||
err := ioutil.WriteFile("beegopro.toml", []byte(BeegoToml), 0644)
|
||||
if err != nil {
|
||||
beeLogger.Log.Fatalf("write beego pro toml err: %s", err)
|
||||
return
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user