Skip to content

Commit 3f69b96

Browse files
authored
convert JSON to bytes for parsing (#2773)
1 parent dd9d050 commit 3f69b96

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

plugin/plugin_examples/test_rpc_server_example/test_rpc_server_example.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import (
88
"encoding/json"
99
"fmt"
1010
"os"
11+
"strings"
1112

1213
"code.cloudfoundry.org/cli/cf/flags"
1314
"code.cloudfoundry.org/cli/plugin"
@@ -95,7 +96,7 @@ func getAllApps(cliConnection plugin.CliConnection) (AppsModel, error) {
9596
}
9697

9798
apps := AppsModel{}
98-
err = json.Unmarshal([]byte(output[0]), &apps)
99+
err = json.Unmarshal([]byte(strings.Join(output, " ")), &apps)
99100
if err != nil {
100101
return AppsModel{}, err
101102
}

0 commit comments

Comments
 (0)