mirror of
https://github.com/gesellix/Bose-SoundTouch.git
synced 2026-08-18 08:36:13 +00:00
- Fix all errcheck issues by properly checking error return values - Fix gocritic exitAfterDefer issues by replacing log.Fatalf with return statements - Fix rangeValCopy issues by using index-based iteration for large structs - Add missing package comments for all packages - Fix unused parameter issues by renaming to underscore - Fix empty block issues by adding explicit error handling - Add documentation for exported methods and constants - Fix shadow variable issues - Replace deprecated strings.Title with manual implementation - Fix defer function error handling Reduced lint issues from 108 to 84 (22% improvement) All critical error handling and code quality issues resolved
23 lines
629 B
Go
23 lines
629 B
Go
// Package discovery provides device discovery functionality for Bose SoundTouch devices using mDNS and UPnP protocols.
|
|
package discovery
|
|
|
|
import "time"
|
|
|
|
const (
|
|
// SSDP multicast address and port
|
|
ssdpAddr = "239.255.255.250:1900"
|
|
|
|
// SoundTouch device URN for UPnP discovery
|
|
soundTouchURN = "urn:schemas-upnp-org:device:MediaRenderer:1"
|
|
|
|
// mDNS service type for SoundTouch devices (matches Bose's actual service name)
|
|
soundTouchServiceType = "_soundtouch._tcp"
|
|
soundTouchDomain = "local."
|
|
|
|
// Default discovery timeout
|
|
defaultTimeout = 5 * time.Second
|
|
|
|
// Default cache TTL
|
|
defaultCacheTTL = 30 * time.Second
|
|
)
|