2020-07-04 14:58:03 +00:00
|
|
|
package beegopro
|
|
|
|
|
|
|
|
import (
|
2020-10-09 15:33:58 +00:00
|
|
|
"io/ioutil"
|
|
|
|
|
2020-12-16 05:20:41 +00:00
|
|
|
"github.com/beego/bee/v2/internal/pkg/utils"
|
|
|
|
beeLogger "github.com/beego/bee/v2/logger"
|
2020-07-04 14:58:03 +00:00
|
|
|
)
|
2020-10-09 15:33:58 +00:00
|
|
|
|
2020-08-01 09:12:09 +00:00
|
|
|
var CompareExcept = []string{"@BeeGenerateTime"}
|
2020-10-09 15:33:58 +00:00
|
|
|
|
2020-07-04 14:58:03 +00:00
|
|
|
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
|
|
|
|
}
|
|
|
|
}
|