use pttodo.NewRootFromFiles in cli

master
Bel LaPointe 2023-11-06 12:58:46 -07:00
parent bfcec9d1c5
commit 39345e5e2a
1 changed files with 3 additions and 11 deletions

View File

@ -15,19 +15,11 @@ func dump(config config) error {
}
func _dump(writer io.Writer, filepaths []string, tags []string, search, rootDisplay string) error {
var root pttodo.Root
for _, filepath := range filepaths {
subroot, err := pttodo.NewRootFromFile(filepath)
if err != nil {
return err
}
subroot.MoveScheduledToTodo()
root.MergeIn(subroot)
root, err := pttodo.NewRootFromFiles(filepaths...)
if err != nil {
return err
}
root.MoveScheduledToTodo()
var v interface{} = root
switch rootDisplay {
case DUMP_ALL: