Releases: Linux amd64 + Windows amd64 Binaries mit Build-Tags für USB

- USB-Input via evdev wird nur auf Linux gebaut (build tag linux)
- Windows bekommt USB-Stub (build tag !linux)
- Binaries: sportscore-linux-amd64 (ELF 64-bit), sportscore-windows-amd64.exe (PE32+)
- Alle Tests bestanden
This commit is contained in:
2026-07-14 17:43:57 +02:00
parent 53ff08f45e
commit dfaa87994a
5 changed files with 146 additions and 123 deletions
+32
View File
@@ -0,0 +1,32 @@
//go:build !linux
package usb
import (
"fmt"
)
// Keyboard represents an input device (keyboard).
// Non-Linux stub.
type Keyboard struct{}
// OpenFirstKeyboard opens the first available keyboard device.
// On non-Linux platforms, it always returns an error.
func OpenFirstKeyboard() (*Keyboard, error) {
return nil, fmt.Errorf("usb keyboard input is only supported on Linux")
}
// Close releases the keyboard device.
func (kb *Keyboard) Close() error {
return nil
}
// ReadKey reads the next key event from the keyboard.
func (kb *Keyboard) ReadKey() (*Key, error) {
return nil, fmt.Errorf("usb keyboard input is only supported on Linux")
}
// GetDeviceInfo returns information about the connected keyboard.
func (kb *Keyboard) GetDeviceInfo() string {
return "linux-only"
}