Merge pull request #196 from lavalamp/marshal

Make api able to marshal its types correctly
This commit is contained in:
brendandburns
2014-06-23 13:22:52 -07:00
16 changed files with 373 additions and 134 deletions

View File

@@ -169,7 +169,7 @@ func executeAPIRequest(method string, auth *kube_client.AuthInfo) bool {
printer = &cloudcfg.HumanReadablePrinter{}
}
var body string
var body []byte
if body, err = cloudcfg.DoRequest(request, auth); err == nil {
if err = printer.Print(body, os.Stdout); err != nil {
log.Fatalf("Failed to print: %#v\nRaw received text:\n%v\n", err, string(body))