MSP-5014 Refactor utils
This commit is contained in:
1 parent
7c01299e53
commit
8c49ae85ed
10 files changed
+44
-60
No files matched your search
+7
-8
@@ -52,13 +52,12 @@ func (c Get) action(ctx *cli.Context) error {
|
||||
}
|
||||
|
||||
if pathObject == "" {
|
||||
utils.PrintAnswer(data)
|
||||
} else {
|
||||
jsonObject, err := json.Marshal(data)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
utils.CheckObject(jsonObject, pathObject)
|
||||
return utils.PrintAnswer(data)
|
||||
}
|
||||
return nil
|
||||
|
||||
jsonObject, err := json.Marshal(data)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
return utils.CheckObject(jsonObject, pathObject)
|
||||
}
|
||||
Reference in new issue
Block a user