Files
mayhem-party/src/device/output/output.go
2023-03-02 15:24:26 -07:00

20 lines
279 B
Go

package output
import (
"context"
"mayhem-party/src/device/output/key"
"os"
)
type Output interface {
Close()
Press(...key.Key)
}
func New(ctx context.Context) Output {
if os.Getenv("OUTPUT_KEYBOARD") == "true" {
return NewKeyboard()
}
return NewWriter(os.Stderr)
}