This commit is contained in:
MHSanaei 2024-07-12 00:20:06 +02:00 committed by GitHub
parent c69d38ae82
commit 16de0937a8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
39 changed files with 72 additions and 72 deletions

View file

@ -85,7 +85,7 @@ func NewClient(
return errors.New("failed to create nameserver").Base(err).AtWarning()
}
// Priotize local domains with specific TLDs or without any dot to local DNS
// Prioritize local domains with specific TLDs or those without any dot for the local DNS
if _, isLocalDNS := server.(*LocalNameServer); isLocalDNS {
ns.PrioritizedDomain = append(ns.PrioritizedDomain, localTLDsAndDotlessDomains...)
ns.OriginalRules = append(ns.OriginalRules, localTLDsAndDotlessDomainsRule)

View file

@ -259,7 +259,7 @@ func (s *DoHNameServer) sendQuery(ctx context.Context, domain string, clientIP n
})
// forced to use mux for DOH
// dnsCtx = session.ContextWithMuxPrefered(dnsCtx, true)
// dnsCtx = session.ContextWithMuxPreferred(dnsCtx, true)
var cancel context.CancelFunc
dnsCtx, cancel = context.WithDeadline(dnsCtx, deadline)

View file

@ -30,8 +30,8 @@ func New(ctx context.Context, config *Config) (*Instance, error) {
}
log.RegisterHandler(g)
// start logger instantly on inited
// other modules would log during init
// Start logger instantly on initialization
// Other modules would log during initialization
if err := g.startInternal(); err != nil {
return nil, err
}

View file

@ -209,7 +209,7 @@ func (h *HealthPing) PutResult(tag string, rtt time.Duration) {
if !ok {
// validity is 2 times to sampling period, since the check are
// distributed in the time line randomly, in extreme cases,
// previous checks are distributed on the left, and latters
// Previous checks are distributed on the left, and later ones
// on the right
validity := h.Settings.Interval * time.Duration(h.Settings.SamplingCount) * 2
r = NewHealthPingResult(h.Settings.SamplingCount, validity)

View file

@ -272,7 +272,7 @@ func TestServiceSubscribeSubsetOfFields(t *testing.T) {
}
}
func TestSerivceTestRoute(t *testing.T) {
func TestServiceTestRoute(t *testing.T) {
c := stats.NewChannel(&stats.ChannelConfig{
SubscriberLimit: 1,
BufferSize: 16,

View file

@ -95,7 +95,7 @@ func TestStatsChannel(t *testing.T) {
}
}
func TestStatsChannelUnsubcribe(t *testing.T) {
func TestStatsChannelUnsubscribe(t *testing.T) {
c := NewChannel(&ChannelConfig{Blocking: true})
common.Must(c.Start())
defer c.Close()

View file

@ -18,7 +18,7 @@ func TestStatsCounter(t *testing.T) {
common.Must(err)
if v := c.Add(1); v != 1 {
t.Fatal("unpexcted Add(1) return: ", v, ", wanted ", 1)
t.Fatal("unexpected Add(1) return: ", v, ", wanted ", 1)
}
if v := c.Set(0); v != 1 {