b7daa2f3a4
Update traefik dependencies (docker/docker and related) - Update dependencies - Fix compilation problems - Remove vdemeester/docker-events (in docker api now) - Remove `integration/vendor` - Use `testImport` - update some deps. - regenerate the lock from scratch (after a `glide cc`)
24 lines
427 B
Go
24 lines
427 B
Go
package ansiterm
|
|
|
|
type groundState struct {
|
|
baseState
|
|
}
|
|
|
|
func (gs groundState) Handle(b byte) (s state, e error) {
|
|
gs.parser.context.currentChar = b
|
|
|
|
nextState, err := gs.baseState.Handle(b)
|
|
if nextState != nil || err != nil {
|
|
return nextState, err
|
|
}
|
|
|
|
switch {
|
|
case sliceContains(printables, b):
|
|
return gs, gs.parser.print()
|
|
|
|
case sliceContains(executors, b):
|
|
return gs, gs.parser.execute()
|
|
}
|
|
|
|
return gs, nil
|
|
}
|