mirror of
https://github.com/beego/bee.git
synced 2024-12-23 01:30:50 +00:00
currpath fix
This commit is contained in:
parent
4b56b8576c
commit
04bb76cad6
@ -585,7 +585,7 @@ func createapi(cmd *Command, args []string) int {
|
|||||||
ColorLog("[INFO] Using '%s' as 'driver'\n", driver)
|
ColorLog("[INFO] Using '%s' as 'driver'\n", driver)
|
||||||
ColorLog("[INFO] Using '%s' as 'conn'\n", conn)
|
ColorLog("[INFO] Using '%s' as 'conn'\n", conn)
|
||||||
ColorLog("[INFO] Using '%s' as 'tables'", tables)
|
ColorLog("[INFO] Using '%s' as 'tables'", tables)
|
||||||
generateAppcode(string(driver), string(conn), "3", string(tables), path.Join(curpath, packpath))
|
generateAppcode(string(driver), string(conn), "3", string(tables), path.Join(curpath, args[0]))
|
||||||
} else {
|
} else {
|
||||||
os.Mkdir(path.Join(apppath, "models"), 0755)
|
os.Mkdir(path.Join(apppath, "models"), 0755)
|
||||||
fmt.Println("create models:", path.Join(apppath, "models"))
|
fmt.Println("create models:", path.Join(apppath, "models"))
|
||||||
@ -621,7 +621,7 @@ func createapi(cmd *Command, args []string) int {
|
|||||||
writetofile(path.Join(apppath, "main.go"),
|
writetofile(path.Join(apppath, "main.go"),
|
||||||
strings.Replace(apiMaingo, "{{.Appname}}", packpath, -1))
|
strings.Replace(apiMaingo, "{{.Appname}}", packpath, -1))
|
||||||
}
|
}
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
func checkEnv(appname string) (apppath, packpath string, err error) {
|
func checkEnv(appname string) (apppath, packpath string, err error) {
|
||||||
|
Loading…
Reference in New Issue
Block a user