1
0
mirror of https://github.com/beego/bee.git synced 2025-06-12 04:50:40 +00:00

repair staticcheck

This commit is contained in:
yitea
2020-07-21 22:24:42 +08:00
parent cc2b2d1054
commit d9633cd9af
7 changed files with 33 additions and 47 deletions

View File

@ -21,32 +21,33 @@ var DefaultBeegoPro = &Container{
TimestampFile: system.CurrentDir + "/.beegopro.timestamp",
GoModFile: system.CurrentDir + "/go.mod",
UserOption: UserOption{
Debug: false,
ContextDebug: false,
Dsn: "",
Driver: "mysql",
ProType: "default",
ApiPrefix: "/api",
EnableModule: nil,
Models: make(map[string]TextModel, 0),
GitRemotePath: "https://github.com/beego/beego-pro.git",
Branch: "master",
GitLocalPath: system.BeegoHome + "/beego-pro",
EnableFormat: true,
SourceGen: "text",
EnableGitPull: true,
RefreshGitTime: 24 * 3600,
Debug: false,
ContextDebug: false,
Dsn: "",
Driver: "mysql",
ProType: "default",
ApiPrefix: "/api",
EnableModule: nil,
Models: make(map[string]TextModel),
GitRemotePath: "https://github.com/beego/beego-pro.git",
Branch: "master",
GitLocalPath: system.BeegoHome + "/beego-pro",
EnableFormat: true,
SourceGen: "text",
EnableGitPull: true,
Path: map[string]string{
"beego": ".",
},
EnableGomod: true,
EnableGomod: true,
RefreshGitTime: 24 * 3600,
Extend: nil,
},
GenerateTime: time.Now().Format(MDateFormat),
GenerateTimeUnix: time.Now().Unix(),
TmplOption: TmplOption{},
CurPath: system.CurrentDir,
EnableModules: make(map[string]interface{}, 0), // get the user configuration, get the enable module result
FunctionOnce: make(map[string]sync.Once, 0), // get the tmpl configuration, get the function once result
EnableModules: make(map[string]interface{}), // get the user configuration, get the enable module result
FunctionOnce: make(map[string]sync.Once), // get the tmpl configuration, get the function once result
}
func (c *Container) Run() {
@ -128,7 +129,7 @@ func (c *Container) initTemplateOption() {
}
for _, value := range c.TmplOption.Descriptor {
if value.Once == true {
if value.Once {
c.FunctionOnce[value.SrcName] = sync.Once{}
}
}