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 {
|
func _dump(writer io.Writer, filepaths []string, tags []string, search, rootDisplay string) error {
|
||||||
var root pttodo.Root
|
root, err := pttodo.NewRootFromFiles(filepaths...)
|
||||||
|
if err != nil {
|
||||||
for _, filepath := range filepaths {
|
return err
|
||||||
subroot, err := pttodo.NewRootFromFile(filepath)
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
subroot.MoveScheduledToTodo()
|
|
||||||
root.MergeIn(subroot)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
root.MoveScheduledToTodo()
|
|
||||||
|
|
||||||
var v interface{} = root
|
var v interface{} = root
|
||||||
switch rootDisplay {
|
switch rootDisplay {
|
||||||
case DUMP_ALL:
|
case DUMP_ALL:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue