From ee3999303dca34831ca67b684094d4b01cc2a20c Mon Sep 17 00:00:00 2001 From: cui fliter Date: Tue, 25 Apr 2023 23:25:07 +0800 Subject: [PATCH] fix some comments (#6052) Signed-off-by: cui fliter --- core/dnsserver/register.go | 2 +- plugin/file/wildcard.go | 2 +- plugin/kubernetes/controller.go | 4 ++-- plugin/pkg/proxy/persistent.go | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/core/dnsserver/register.go b/core/dnsserver/register.go index 8de559066..b81573ff7 100644 --- a/core/dnsserver/register.go +++ b/core/dnsserver/register.go @@ -287,7 +287,7 @@ func (h *dnsContext) validateZonesAndListeningAddresses() error { return nil } -// groupSiteConfigsByListenAddr groups site configs by their listen +// groupConfigsByListenAddr groups site configs by their listen // (bind) address, so sites that use the same listener can be served // on the same server instance. The return value maps the listen // address (what you pass into net.Listen) to the list of site configs. diff --git a/plugin/file/wildcard.go b/plugin/file/wildcard.go index 9526cb53f..7e8e806a1 100644 --- a/plugin/file/wildcard.go +++ b/plugin/file/wildcard.go @@ -2,7 +2,7 @@ package file import "github.com/miekg/dns" -// replaceWithWildcard replaces the left most label with '*'. +// replaceWithAsteriskLabel replaces the left most label with '*'. func replaceWithAsteriskLabel(qname string) (wildcard string) { i, shot := dns.NextLabel(qname, 0) if shot { diff --git a/plugin/kubernetes/controller.go b/plugin/kubernetes/controller.go index a34b64143..7edd18ca9 100644 --- a/plugin/kubernetes/controller.go +++ b/plugin/kubernetes/controller.go @@ -605,7 +605,7 @@ func (dns *dnsControl) detectChanges(oldObj, newObj interface{}) { dns.updateModified() } if emod { - dns.updateExtModifed() + dns.updateExtModified() } case *object.Pod: dns.updateModified() @@ -749,7 +749,7 @@ func (dns *dnsControl) updateModified() { } // updateExtModified set dns.extModified to the current time. -func (dns *dnsControl) updateExtModifed() { +func (dns *dnsControl) updateExtModified() { unix := time.Now().Unix() atomic.StoreInt64(&dns.extModified, unix) } diff --git a/plugin/pkg/proxy/persistent.go b/plugin/pkg/proxy/persistent.go index 0908ce96c..2dc8bde71 100644 --- a/plugin/pkg/proxy/persistent.go +++ b/plugin/pkg/proxy/persistent.go @@ -42,7 +42,7 @@ func newTransport(addr string) *Transport { return t } -// connManagers manages the persistent connection cache for UDP and TCP. +// connManager manages the persistent connection cache for UDP and TCP. func (t *Transport) connManager() { ticker := time.NewTicker(defaultExpire) defer ticker.Stop()