1
0
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:
astaxie 2014-08-09 01:48:40 +08:00
parent 375eb44479
commit 5ffc17febb
2 changed files with 2 additions and 1 deletions

1
g.go
View File

@ -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")

View File

@ -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