use pttodo.NewRootFromFiles in cli
parent
bfcec9d1c5
commit
39345e5e2a
14
cmd/dump.go
14
cmd/dump.go
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Reference in New Issue