mirror of
https://github.com/beego/bee.git
synced 2025-07-05 18:20:18 +00:00
return actual value from subcommand
This commit is contained in:
3
g.go
3
g.go
@ -69,7 +69,7 @@ func init() {
|
||||
cmdGenerate.Flag.Var(&fields, "fields", "specify the fields want to generate.")
|
||||
}
|
||||
|
||||
func generateCode(cmd *Command, args []string) {
|
||||
func generateCode(cmd *Command, args []string) int {
|
||||
curpath, _ := os.Getwd()
|
||||
if len(args) < 1 {
|
||||
ColorLog("[ERRO] command is missing\n")
|
||||
@ -193,4 +193,5 @@ func generateCode(cmd *Command, args []string) {
|
||||
ColorLog("[ERRO] command is missing\n")
|
||||
}
|
||||
ColorLog("[SUCC] generate successfully created!\n")
|
||||
return 0
|
||||
}
|
||||
|
Reference in New Issue
Block a user