Revert "Switch to new vendor directory layout"
This reverts commit d5742209d3
.
Signed-off-by: Michael Crosby <crosbymichael@gmail.com>
This commit is contained in:
parent
a21a956a2d
commit
b4c901f34a
806 changed files with 7 additions and 2 deletions
38
vendor/src/github.com/Azure/go-ansiterm/csi_param_state.go
vendored
Normal file
38
vendor/src/github.com/Azure/go-ansiterm/csi_param_state.go
vendored
Normal file
|
@ -0,0 +1,38 @@
|
|||
package ansiterm
|
||||
|
||||
type CsiParamState struct {
|
||||
BaseState
|
||||
}
|
||||
|
||||
func (csiState CsiParamState) Handle(b byte) (s State, e error) {
|
||||
logger.Infof("CsiParam::Handle %#x", b)
|
||||
|
||||
nextState, err := csiState.BaseState.Handle(b)
|
||||
if nextState != nil || err != nil {
|
||||
return nextState, err
|
||||
}
|
||||
|
||||
switch {
|
||||
case sliceContains(Alphabetics, b):
|
||||
return csiState.parser.Ground, nil
|
||||
case sliceContains(CsiCollectables, b):
|
||||
csiState.parser.collectParam()
|
||||
return csiState, nil
|
||||
case sliceContains(Executors, b):
|
||||
return csiState, csiState.parser.execute()
|
||||
}
|
||||
|
||||
return csiState, nil
|
||||
}
|
||||
|
||||
func (csiState CsiParamState) Transition(s State) error {
|
||||
logger.Infof("CsiParam::Transition %s --> %s", csiState.Name(), s.Name())
|
||||
csiState.BaseState.Transition(s)
|
||||
|
||||
switch s {
|
||||
case csiState.parser.Ground:
|
||||
return csiState.parser.csiDispatch()
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue