Some checks failed
gobuild / build (push) Failing after 4s
Move browser, config, player, and radio logic into internal/{config,radio,player,ui,version}.
Add cached API host resolution, context-aware HTTP client, and nil/length guards to eliminate
RandomIP, nslookup, reverseLookup, and GetStations panics. Replace subExecute with clean
legacyPlayer using Run-only execution. Fix inverted -short test guards, unformatted config
error messages, and "Erorr" typo. Remove obsolete vendor/GOPATH logic from build scripts.
Update callers in stations.go and radiomenu.go to new paths; retain shims for transition.
28 lines
911 B
Go
28 lines
911 B
Go
package main
|
|
|
|
// Deprecated: implementation moved to internal/radio during reorg (Phase 1).
|
|
// This file provides shims for tests and any remaining same-package references
|
|
// during the transition. Remove after full migration of callers and tests.
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/gmgauthier/gostations/internal/radio"
|
|
)
|
|
|
|
// stationRecord is a type alias for backward compat in tests and old call sites.
|
|
type stationRecord = radio.Station
|
|
|
|
// StationSearch shim (used by some tests).
|
|
func StationSearch(name string, country string, state string, tags string, notok bool) ([]stationRecord, error) {
|
|
ss, err := radio.Search(context.Background(), name, country, state, tags, notok)
|
|
// convert slice of alias (identical underlying)
|
|
out := make([]stationRecord, len(ss))
|
|
for i := range ss {
|
|
out[i] = ss[i]
|
|
}
|
|
return out, err
|
|
}
|
|
|
|
// GetApiHost etc are intentionally not shimmed; new code uses internal/radio.
|