(cmd *cobra.Command, path string, limit uint64, entries []*files.FileMetadata, opts listOptions)
| 65 | } |
| 66 | |
| 67 | func 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 | |
| 84 | func newRevsInput(path string, limit uint64, opts listOptions) revsInput { |
| 85 | return revsInput{ |
no test coverage detected