Skip to content

Commit 598e15a

Browse files
committed
style: refine var name
1 parent 708ce02 commit 598e15a

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

app/dns/dns.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ import (
2323
type DNS struct {
2424
sync.Mutex
2525
tag string
26-
cs CacheStrategy
26+
cacheStrategy CacheStrategy
2727
disableFallback bool
2828
ipOption *dns.IPOption
2929
hosts *StaticHosts
@@ -139,7 +139,7 @@ func New(ctx context.Context, config *Config) (*DNS, error) {
139139
ctx: ctx,
140140
domainMatcher: domainMatcher,
141141
matcherInfos: matcherInfos,
142-
cs: config.CacheStrategy,
142+
cacheStrategy: config.CacheStrategy,
143143
disableFallback: config.DisableFallback,
144144
}, nil
145145
}
@@ -231,7 +231,7 @@ func (s *DNS) lookupIPInternal(domain string, option *dns.IPOption) ([]net.IP, e
231231
errs := []error{}
232232
ctx := session.ContextWithInbound(s.ctx, &session.Inbound{Tag: s.tag})
233233
for _, client := range s.sortClients(domain, option) {
234-
ips, err := client.QueryIP(ctx, domain, *option, s.cs)
234+
ips, err := client.QueryIP(ctx, domain, *option, s.cacheStrategy)
235235
if len(ips) > 0 {
236236
return ips, nil
237237
}

0 commit comments

Comments
 (0)