mirror of
https://github.com/XTLS/Xray-core.git
synced 2025-04-29 16:58:34 +00:00
chore: fix some errors detected by staticcheck (#3089)
* chore: fix some errors detected by staticcheck * feat: remove `rand.Seed()` usage for possibly using "fastrand64" runtime to avoid locking ref: https://pkg.go.dev/math/rand#Seed
This commit is contained in:
parent
173b03448f
commit
a994bf8b04
10 changed files with 23 additions and 27 deletions
|
@ -181,9 +181,7 @@ func (s *DNS) LookupIP(domain string, option dns.IPOption) ([]net.IP, error) {
|
|||
}
|
||||
|
||||
// Normalize the FQDN form query
|
||||
if strings.HasSuffix(domain, ".") {
|
||||
domain = domain[:len(domain)-1]
|
||||
}
|
||||
domain = strings.TrimSuffix(domain, ".")
|
||||
|
||||
// Static host lookup
|
||||
switch addrs := s.hosts.Lookup(domain, option); {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue