<- Back to shtanton's homepage
aboutsummaryrefslogtreecommitdiff
path: root/main/main.go
diff options
context:
space:
mode:
Diffstat (limited to 'main/main.go')
-rw-r--r--main/main.go13
1 files changed, 9 insertions, 4 deletions
diff --git a/main/main.go b/main/main.go
index 902c5b9..923ffa6 100644
--- a/main/main.go
+++ b/main/main.go
@@ -9,7 +9,7 @@ import (
type Program []Command
type ProgramState struct {
- space []walk.WalkItem
+ path, value, xreg []walk.WalkValue
in chan walk.WalkItem
out chan walk.WalkItem
program []Command
@@ -50,13 +50,18 @@ func main() {
go func () {
for walkItem := range dataStream {
- state.space = []walk.WalkItem{walkItem}
+ state.value = []walk.WalkValue{walkItem.Value}
+ state.path = walkItem.Path.ToWalkValues()
for _, cmd := range state.program {
cmd.exec(&state)
}
if !quiet {
- for _, item := range state.space {
- state.out <- item
+ path := walk.PathFromWalkValues(state.path)
+ for _, value := range state.value {
+ state.out <- walk.WalkItem {
+ Value: value,
+ Path: path,
+ }
}
}
}