gnormal / gnorm

A database-first code generator for any language
https://gnorm.org
Other
485 stars 40 forks source link

Add --format flag to preview command #31

Closed gernest closed 7 years ago

gernest commented 7 years ago

This simplifies flags to preview command

e.g

gnorm preview --format yaml

This stest tabular to the default format.

Superceeds #27 Closes #11

gernest commented 7 years ago

Done!

gernest commented 7 years ago

Done, except for enuming the format options. I believe it is an overkill. You can always update the code to use enum for this later, I'm just not comfortable to make the change.

The reason I feel this way is, we will still have a switch to match the enum, the only difference is we match against integers instead of strings. For the three simple branches relevant to only one function, I say it is an overkill.

gernest commented 7 years ago

see #36