1
0
mirror of https://github.com/beego/bee.git synced 2025-06-24 20:40:18 +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

@ -75,7 +75,7 @@ func (descriptor Descriptor) Parse(modelName string, paths map[string]string) (n
newDescriptor = descriptor
render := pongo2render.NewRender("")
ctx = make(pongo2.Context, 0)
ctx = make(pongo2.Context)
for key, value := range paths {
absFile, err = filepath.Abs(value)
if err != nil {
@ -110,10 +110,7 @@ func (descriptor Descriptor) Parse(modelName string, paths map[string]string) (n
}
func (descriptor Descriptor) IsExistScript() bool {
if descriptor.Script != "" {
return true
}
return false
return descriptor.Script != ""
}
func (d Descriptor) ExecScript(path string) (err error) {