mirror of
https://github.com/beego/bee.git
synced 2024-11-21 18:40: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":
|
||||
if len(args) == 2 {
|
||||
cname := args[1]
|
||||
ColorLog("[INFO] Using '%s' as controller name\n", cname)
|
||||
generateController(cname, curpath)
|
||||
} else {
|
||||
ColorLog("[ERRO] Wrong number of arguments\n")
|
||||
|
@ -31,6 +31,8 @@ func generateController(cname, crupath string) {
|
||||
i := strings.LastIndex(p[: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)
|
||||
if _, err := os.Stat(fp); os.IsNotExist(err) {
|
||||
// create controller directory
|
||||
|
Loading…
Reference in New Issue
Block a user