mirror of
https://github.com/linuxkit/linuxkit.git
synced 2026-04-11 10:58:01 +00:00
We were missing one repo needed for Windows; but we have also not deleted a bunch of vendored code that we are no longer using. Signed-off-by: Justin Cormack <justin.cormack@docker.com>
25 lines
427 B
Go
25 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
|
|
}
|