MCPcopy
hub / github.com/badafans/better-cloudflare-ip / lookupDataCenter

Function lookupDataCenter

main.go:427–436  ·  view source on GitHub ↗

lookupDataCenter 查找数据中心名称

(colo string)

Source from the content-addressed store, hash-verified

425
426// lookupDataCenter 查找数据中心名称
427func lookupDataCenter(colo string) string {
428 locationMu.RLock()
429 loc := locationMap[colo]
430 locationMu.RUnlock()
431
432 if loc.City != "" {
433 return loc.City
434 }
435 return colo
436}
437
438// runSingleSpeedTest 单 IP 测速
439func runSingleSpeedTest(useTLS bool) {

Callers 2

cloudflareTestFunction · 0.85
runSingleSpeedTestFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected