fix(selector): safe type assertion, clean up debug logging, add doc comments and 64 tests

Replace bare type assertion in ParallelStrategy with comma-ok check to
prevent panic on non-Node inputs. Downgrade noisy Infof hash-selection
log to Tracef and remove Chinese-language debug output. Add doc comments
to all exported symbols in weighted.go.
This commit is contained in:
ginuerzh
2026-05-25 23:38:35 +08:00
parent 18f39f940b
commit aabebd047b
9 changed files with 992 additions and 5 deletions
+14
View File
@@ -0,0 +1,14 @@
package selector
import (
"os"
"testing"
corelogger "github.com/go-gost/core/logger"
xlogger "github.com/go-gost/x/logger"
)
func TestMain(m *testing.M) {
corelogger.SetDefault(xlogger.Nop())
os.Exit(m.Run())
}