diff --git a/cmd/modern/root.go b/cmd/modern/root.go index 22e6f661..6d38cc22 100644 --- a/cmd/modern/root.go +++ b/cmd/modern/root.go @@ -17,6 +17,7 @@ type Root struct { configFilename string loggingLevel int outputType string + inputType string } // DefineCommand defines the top-level sqlcmd sub-commands. @@ -113,4 +114,12 @@ func (c *Root) addGlobalFlags() { Shorthand: "v", Usage: "Log level, error=0, warn=1, info=2, debug=3, trace=4", }) + + c.AddFlag(cmdparser.FlagOptions{ + String: &c.inputType, + DefaultString: "yaml", + Name: "InputFile", + Shorthand: "i", + Usage: "output type (yaml, json or xml)", + }) }