Introduce structured CLI argument parsing using Cobra with three configurable flags: --vendor: USB vendor ID (default: 0x0fcf) --product: USB product ID (default: 0x1008) --device: ANT+ device number (default: 3001) Add timestamped logging for all log statements with format YYYY-MM-DD HH:MM:SS. Log vendor, product, and device values at startup in both hex and decimal. Remove hardcoded USB identifiers from main.go and consolidate all startup logic into cli.go with a dedicated Config struct. Update ant.go ListenForTrainer signature to accept uint16 for vendor and product IDs.
30 lines
921 B
Modula-2
30 lines
921 B
Modula-2
module git.wamblee.org/antplusbridge
|
|
|
|
go 1.26.2
|
|
|
|
require (
|
|
github.com/half2me/antgo v0.0.0-20240825222428-e6b9ddc9c32f
|
|
github.com/spf13/cobra v1.10.2
|
|
tinygo.org/x/bluetooth v0.15.0
|
|
)
|
|
|
|
require (
|
|
github.com/inconshreveable/mousetrap v1.1.0 // indirect
|
|
github.com/spf13/pflag v1.0.9 // indirect
|
|
)
|
|
|
|
require (
|
|
github.com/go-ole/go-ole v1.2.6 // indirect
|
|
github.com/godbus/dbus/v5 v5.1.0 // indirect
|
|
github.com/google/gousb v1.1.3
|
|
github.com/saltosystems/winrt-go v0.0.0-20260317170058-9c2fec580d96 // indirect
|
|
github.com/sirupsen/logrus v1.9.3 // indirect
|
|
github.com/soypat/cyw43439 v0.1.0 // indirect
|
|
github.com/soypat/lneto v0.1.0 // indirect
|
|
github.com/soypat/seqs v0.0.0-20250124201400-0d65bc7c1710 // indirect
|
|
github.com/tinygo-org/cbgo v0.0.4 // indirect
|
|
github.com/tinygo-org/pio v0.3.0 // indirect
|
|
golang.org/x/exp v0.0.0-20241204233417-43b7b7cde48d // indirect
|
|
golang.org/x/sys v0.11.0 // indirect
|
|
)
|