mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-09 18:33:36 +02:00
refactor(entrypoint): streamline benchmark tests and enhance error handling
- Introduced `NewTestRoute` function to simplify route creation in benchmark tests. - Replaced direct route validation and starting with error handling using `require.NoError`. - Updated server retrieval to use `common.ProxyHTTPAddr` for consistency. - Improved logging for HTTP route addition errors in `AddRoute` method.
This commit is contained in:
@@ -126,10 +126,6 @@ func (ep *Entrypoint) GetServer(addr string) (http.Handler, bool) {
|
||||
return ep.servers.Load(addr)
|
||||
}
|
||||
|
||||
func (ep *Entrypoint) PrintServers() {
|
||||
log.Info().Msgf("servers: %v", xsync.ToPlainMap(ep.servers))
|
||||
}
|
||||
|
||||
func (ep *Entrypoint) SetFindRouteDomains(domains []string) {
|
||||
if len(domains) == 0 {
|
||||
ep.findRouteFunc = findRouteAnyDomain
|
||||
|
||||
Reference in New Issue
Block a user