mirror of
https://github.com/rclone/rclone.git
synced 2025-08-15 08:12:45 +02:00
operations: turn ListFormatted into a Format method on ListFormat
This commit is contained in:
@ -1445,11 +1445,11 @@ func (l *ListFormat) AppendOutput(functionToAppend func() string) {
|
||||
l.output = append(l.output, functionToAppend)
|
||||
}
|
||||
|
||||
// ListFormatted prints information about specific file in specific format
|
||||
func ListFormatted(entry *fs.DirEntry, list *ListFormat) string {
|
||||
list.entry = *entry
|
||||
// Format prints information about the DirEntry in the format defined
|
||||
func (l *ListFormat) Format(entry fs.DirEntry) string {
|
||||
l.entry = entry
|
||||
var out string
|
||||
for _, fun := range list.output {
|
||||
for _, fun := range l.output {
|
||||
out += fun()
|
||||
}
|
||||
return out
|
||||
|
Reference in New Issue
Block a user