AddHash adds the hash of the type given to the output
(ht hash.Type)
| 2291 | |
| 2292 | // AddHash adds the hash of the type given to the output |
| 2293 | func (l *ListFormat) AddHash(ht hash.Type) { |
| 2294 | hashName := ht.String() |
| 2295 | l.AppendOutput(func(entry *ListJSONItem) string { |
| 2296 | if entry.IsDir { |
| 2297 | return "" |
| 2298 | } |
| 2299 | return entry.Hashes[hashName] |
| 2300 | }) |
| 2301 | } |
| 2302 | |
| 2303 | // AddID adds file's ID to the output if known |
| 2304 | func (l *ListFormat) AddID() { |