diff options
Diffstat (limited to 'main/command.go')
-rw-r--r-- | main/command.go | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/main/command.go b/main/command.go index 5e77dd0..9554f9d 100644 --- a/main/command.go +++ b/main/command.go @@ -43,12 +43,16 @@ func (cmd AppendNextCommand) exec(state *ProgramState) { state.path = nextItem.Path.ToWalkValues() } -type DeleteAllCommand struct {} -func (cmd DeleteAllCommand) exec(state *ProgramState) { - state.path = nil +type DeleteValueCommand struct {} +func (cmd DeleteValueCommand) exec(state *ProgramState) { state.value = nil } +type DeletePathCommand struct {} +func (cmd DeletePathCommand) exec(state *ProgramState) { + state.path = nil +} + func runSubex(state subex.SubexState, in []walk.WalkValue) (out []walk.WalkValue, error bool) { valueStream := make(chan walk.WalkValue) go func(in []walk.WalkValue, out chan<- walk.WalkValue) { |