Skip to content
Snippets Groups Projects
Unverified Commit e781e5c8 authored by Ahmet Alp Balkan's avatar Ahmet Alp Balkan
Browse files

rekor-cli: Pretty print for get cmd


Otherwise prints []byte contents which are not quite usable.

Signed-off-by: default avatarAhmet Alp Balkan <ahmetb@google.com>
parent b5e49b4d
No related branches found
No related tags found
No related merge requests found
......@@ -23,6 +23,7 @@ import (
"strconv"
"time"
"github.com/davecgh/go-spew/spew"
"github.com/go-openapi/runtime"
"github.com/sigstore/rekor/cmd/rekor-cli/app/format"
"github.com/sigstore/rekor/pkg/generated/client/entries"
......@@ -46,7 +47,7 @@ func (g *getCmdOutput) String() string {
dt := time.Unix(g.IntegratedTime, 0).UTC().Format(time.RFC3339)
s += fmt.Sprintf("IntegratedTime: %s\n", dt)
s += fmt.Sprintf("UUID: %s\n", g.UUID)
s += fmt.Sprintf("Body: %s\n", g.Body)
s += fmt.Sprintf("Body: %s\n", spew.Sdump(g.Body))
return s
}
......
......@@ -7,6 +7,7 @@ require (
github.com/blang/semver v3.5.1+incompatible
github.com/cavaliercoder/badio v0.0.0-20160213150051-ce5280129e9e // indirect
github.com/cavaliercoder/go-rpm v0.0.0-20200122174316-8cb9fd9c31a8
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/ghodss/yaml v1.0.0
github.com/go-chi/chi v4.1.2+incompatible
github.com/go-openapi/errors v0.20.0
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment