Go-based FM stereo transmitter with RDS, Windows-first and cross-platform
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

24 строки
386B

  1. package ingest
  2. import (
  3. "fmt"
  4. "io"
  5. "net/http"
  6. "github.com/jan/fm-rds-tx/internal/config"
  7. )
  8. type FactoryDeps struct {
  9. Stdin io.Reader
  10. HTTP *http.Client
  11. }
  12. func BuildSource(cfg config.Config, deps FactoryDeps) (Source, error) {
  13. switch cfg.Ingest.Kind {
  14. case "", "none":
  15. return nil, nil
  16. default:
  17. return nil, fmt.Errorf("unsupported ingest kind: %s", cfg.Ingest.Kind)
  18. }
  19. }