PrintCollection prints a collection of objects retrieved from the collection specified by the collection URL.
(collection *url.URL)
| 211 | // PrintCollection prints a collection of objects retrieved from the collection |
| 212 | // specified by the collection URL. |
| 213 | func (p *Printer) PrintCollection(collection *url.URL) error { |
| 214 | it, err := p.client.Iterator(collection, |
| 215 | vt.IteratorLimit(viper.GetInt("limit")), |
| 216 | vt.IteratorCursor(viper.GetString("cursor")), |
| 217 | vt.IteratorFilter(viper.GetString("filter"))) |
| 218 | if err != nil { |
| 219 | return err |
| 220 | } |
| 221 | return p.PrintIterator(it) |
| 222 | } |
| 223 | |
| 224 | // PrintIterator prints the objects returned by an object iterator. |
| 225 | func (p *Printer) PrintIterator(it *vt.Iterator) error { |
no test coverage detected