Checkpoint

This commit is contained in:
maze authored and maze committed 2026-10-29 17:28:51 +01:00
1 parent 7b6db17870
commit 0295eb1ad2
125 files changed
+59376

No files matched your search

+23
View File
@@ -0,0 +1,23 @@
package input
var detectors []func() ([]Source, error)
// Detect returns a list of input sources.
func Detect() ([]Source, error) {
var s []Source
for _, d := range detectors {
ds, err := d()
if err != nil {
return nil, err
}
s = append(s, ds...)
}
return s, nil
}
// Register a new input source detector.
func Register(detector func() ([]Source, error)) {
detectors = append(detectors, detector)
}