added single file support

This commit is contained in:
Lunny Xiao 2013-10-14 18:00:01 +08:00
parent 4dc297c2e3
commit 22b4302e05
1 changed files with 4 additions and 4 deletions

View File

@ -35,7 +35,7 @@ according database's tables and columns to generate codes for Go, C++ and etc.
func init() { func init() {
CmdReverse.Run = runReverse CmdReverse.Run = runReverse
CmdReverse.Flags = map[string]bool{ CmdReverse.Flags = map[string]bool{
"-m": false, "-s": false,
"-l": false, "-l": false,
} }
} }
@ -65,9 +65,9 @@ func runReverse(cmd *Command, args []string) {
return return
} }
var isMultiFile bool var isMultiFile bool = true
if _, ok := cmd.Flags["-m"]; ok { if use, ok := cmd.Flags["-s"]; ok {
isMultiFile = true isMultiFile = !use
} }
curPath, err := os.Getwd() curPath, err := os.Getwd()