migrate invoke to config service
This commit is contained in:
1 parent
b0c9d73755
commit
19c02ef270
12 files changed
+187
-101
No files matched your search
+2
-3
@@ -2,9 +2,8 @@ package command
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"errors"
|
||||
"fmt"
|
||||
"github.com/codegangsta/cli"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/tidwall/gjson"
|
||||
"isp-ctl/bash"
|
||||
"isp-ctl/flag"
|
||||
@@ -54,7 +53,7 @@ func (g getCommand) action(ctx *cli.Context) {
|
||||
func (g getCommand) checkObject(jsonObject []byte, depth string) {
|
||||
jsonString := gjson.Get(string(jsonObject), depth)
|
||||
if jsonString.Raw == "" {
|
||||
printError(errors.New(fmt.Sprintf("Path '%s' not found\n", depth)))
|
||||
printError(errors.Errorf("Path '%s' not found\n", depth))
|
||||
} else {
|
||||
var data interface{}
|
||||
if err := json.Unmarshal([]byte(jsonString.Raw), &data); err != nil {
|
||||
|
||||
Reference in new issue
Block a user