Files
antidrift/internal/evidence/source_other.go
T

17 lines
473 B
Go

//go:build !linux && !windows
package evidence
import "context"
// NewSource returns a sensor that reports evidence permanently unavailable on
// platforms without the X11 adapter.
func NewSource() Source { return noopSource{} }
type noopSource struct{}
func (noopSource) Watch(ctx context.Context, onChange func(WindowSnapshot)) {
onChange(WindowSnapshot{Health: EvidenceHealth{Available: false, Reason: "no active-window sensor on this platform"}})
<-ctx.Done()
}