MSP-5014 Refactor utils
This commit is contained in:
1 parent
7c01299e53
commit
8c49ae85ed
10 files changed
+44
-60
No files matched your search
+1
-2
@@ -55,13 +55,12 @@ func (c Schema) action(ctx *cli.Context) error {
|
||||
schema["schema"] = schemaConfig
|
||||
switch ctx.String(OutPrintFlagName) {
|
||||
case OutPrintJsonValue:
|
||||
utils.PrintAnswer(schema)
|
||||
return utils.PrintAnswer(schema)
|
||||
case OutPrintHtmlValue:
|
||||
return c.printHtml(schema)
|
||||
default:
|
||||
return errors.Errorf("invalid flag value, expected [%s] or [%s]", OutPrintJsonValue, OutPrintHtmlValue)
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
func (c Schema) getSchemaConfig(moduleName string) (schema.Schema, error) {
|
||||
|
||||
Reference in new issue
Block a user