MCPcopy Create free account
hub / github.com/dropbox/dbxcli / renderRevisionsOutput

Function renderRevisionsOutput

cmd/revs.go:67–82  ·  view source on GitHub ↗
(cmd *cobra.Command, path string, limit uint64, entries []*files.FileMetadata, opts listOptions)

Source from the content-addressed store, hash-verified

65}
66
67func renderRevisionsOutput(cmd *cobra.Command, path string, limit uint64, entries []*files.FileMetadata, opts listOptions) error {
68 out := commandOutput(cmd)
69 if commandOutputFormat(cmd) != output.FormatJSON {
70 return out.RenderText(func(w io.Writer) error {
71 return renderRevisionResults(w, entries, opts)
72 })
73 }
74
75 input := newRevsInput(path, limit, opts)
76 metadata, err := jsonMetadataListFromRevisions(entries)
77 if err != nil {
78 return err
79 }
80 results := newJSONMetadataOperationResults(revsJSONStatusRevision, metadata)
81 return renderJSONOperationOutput(cmd, input, results)
82}
83
84func newRevsInput(path string, limit uint64, opts listOptions) revsInput {
85 return revsInput{

Callers 1

revsFunction · 0.85

Calls 8

commandOutputFunction · 0.85
commandOutputFormatFunction · 0.85
renderRevisionResultsFunction · 0.85
newRevsInputFunction · 0.85
RenderTextMethod · 0.80

Tested by

no test coverage detected