mirror of
https://github.com/beego/bee.git
synced 2024-11-21 23:50:54 +00:00
update the comments
This commit is contained in:
parent
375eb44479
commit
5ffc17febb
1
g.go
1
g.go
@ -105,7 +105,6 @@ func generateCode(cmd *Command, args []string) {
|
|||||||
case "controller":
|
case "controller":
|
||||||
if len(args) == 2 {
|
if len(args) == 2 {
|
||||||
cname := args[1]
|
cname := args[1]
|
||||||
ColorLog("[INFO] Using '%s' as controller name\n", cname)
|
|
||||||
generateController(cname, curpath)
|
generateController(cname, curpath)
|
||||||
} else {
|
} else {
|
||||||
ColorLog("[ERRO] Wrong number of arguments\n")
|
ColorLog("[ERRO] Wrong number of arguments\n")
|
||||||
|
@ -31,6 +31,8 @@ func generateController(cname, crupath string) {
|
|||||||
i := strings.LastIndex(p[:len(p)-1], "/")
|
i := strings.LastIndex(p[:len(p)-1], "/")
|
||||||
packageName = p[i+1 : len(p)-1]
|
packageName = p[i+1 : len(p)-1]
|
||||||
}
|
}
|
||||||
|
ColorLog("[INFO] Using '%s' as controller name\n", controllerName)
|
||||||
|
ColorLog("[INFO] Using '%s' as package name\n", packageName)
|
||||||
fp := path.Join(crupath, "controllers", p)
|
fp := path.Join(crupath, "controllers", p)
|
||||||
if _, err := os.Stat(fp); os.IsNotExist(err) {
|
if _, err := os.Stat(fp); os.IsNotExist(err) {
|
||||||
// create controller directory
|
// create controller directory
|
||||||
|
Loading…
Reference in New Issue
Block a user