dont do raw.New, instead add raw.Raw.Refresh explicit
This commit is contained in:
@@ -31,6 +31,9 @@ func NewKeyboard() Keyboard {
|
||||
return Keyboard{}
|
||||
}
|
||||
|
||||
func (kb Keyboard) Refresh() {
|
||||
}
|
||||
|
||||
func (kb Keyboard) Close() {
|
||||
switch runtime.GOOS {
|
||||
case "linux":
|
||||
|
||||
@@ -22,6 +22,9 @@ func NewRandom(generator func() byte) *Random {
|
||||
return &Random{generator: generator}
|
||||
}
|
||||
|
||||
func (r *Random) Refresh() {
|
||||
}
|
||||
|
||||
func (r *Random) Close() {
|
||||
}
|
||||
|
||||
|
||||
@@ -9,6 +9,7 @@ import (
|
||||
type Raw interface {
|
||||
Read() []byte
|
||||
Close()
|
||||
Refresh()
|
||||
}
|
||||
|
||||
func New(ctx context.Context) Raw {
|
||||
|
||||
@@ -55,6 +55,9 @@ func (udp UDP) Read() []byte {
|
||||
}
|
||||
}
|
||||
|
||||
func (udp UDP) Refresh() {
|
||||
}
|
||||
|
||||
func (udp UDP) Close() {
|
||||
udp.conn.Close()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user