use pttodo.NewRootFromFiles in cli
This commit is contained in:
10
cmd/dump.go
10
cmd/dump.go
@@ -15,18 +15,10 @@ 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)
|
||||
root, err := pttodo.NewRootFromFiles(filepaths...)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
subroot.MoveScheduledToTodo()
|
||||
root.MergeIn(subroot)
|
||||
}
|
||||
|
||||
root.MoveScheduledToTodo()
|
||||
|
||||
var v interface{} = root
|
||||
switch rootDisplay {
|
||||
|
||||
Reference in New Issue
Block a user