integrate button.Parser

master
bel 2023-03-24 20:52:44 -06:00
parent 896f5e9c92
commit 2af373aed7
2 changed files with 5 additions and 3 deletions

View File

@ -11,5 +11,5 @@ type Parser interface {
}
func New(ctx context.Context, src raw.Raw) Parser {
panic(nil)
return NewPlaintext(src)
}

View File

@ -2,16 +2,18 @@ package input
import (
"context"
"mayhem-party/src/device/input/button"
"mayhem-party/src/device/input/raw"
"mayhem-party/src/device/input/wrap"
)
type Input interface {
Read() []wrap.Button
Read() []button.Button
Close()
}
func New(ctx context.Context) Input {
src := raw.New(ctx)
return wrap.New(ctx, src)
parser := button.New(ctx, src)
return wrap.New(ctx, parser)
}