20 lines
279 B
Go
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)
|
|
}
|