aboutsummaryrefslogtreecommitdiff
path: root/plugin
diff options
context:
space:
mode:
Diffstat (limited to 'plugin')
-rw-r--r--plugin/autopath/autopath.go2
-rw-r--r--plugin/backend.go2
-rw-r--r--plugin/dnssec/cache.go2
-rw-r--r--plugin/dnssec/responsewriter.go2
-rw-r--r--plugin/dnssec/rrsig.go2
-rw-r--r--plugin/dnstap/taprw/writer.go2
-rw-r--r--plugin/file/secondary.go2
-rw-r--r--plugin/forward/persistent.go2
-rw-r--r--plugin/kubernetes/autopath.go2
-rw-r--r--plugin/kubernetes/object/endpoint.go2
-rw-r--r--plugin/kubernetes/object/service.go2
-rw-r--r--plugin/kubernetes/parse.go2
-rw-r--r--plugin/rewrite/edns0.go6
-rw-r--r--plugin/rewrite/name.go16
-rw-r--r--plugin/rewrite/ttl.go10
-rw-r--r--plugin/test/helpers.go2
-rw-r--r--plugin/test/responsewriter.go12
-rw-r--r--plugin/test/scrape.go2
18 files changed, 36 insertions, 36 deletions
diff --git a/plugin/autopath/autopath.go b/plugin/autopath/autopath.go
index 4db9366d2..b8e153c2a 100644
--- a/plugin/autopath/autopath.go
+++ b/plugin/autopath/autopath.go
@@ -54,7 +54,7 @@ type AutoPather interface {
AutoPath(request.Request) []string
}
-// AutoPath perform autopath: service side search path completion.
+// AutoPath performs autopath: service side search path completion.
type AutoPath struct {
Next plugin.Handler
Zones []string
diff --git a/plugin/backend.go b/plugin/backend.go
index 32443a955..43d07d99c 100644
--- a/plugin/backend.go
+++ b/plugin/backend.go
@@ -26,7 +26,7 @@ type ServiceBackend interface {
// Note: it does not implement a specific service.
Records(ctx context.Context, state request.Request, exact bool) ([]msg.Service, error)
- // IsNameError return true if err indicated a record not found condition
+ // IsNameError returns true if err indicated a record not found condition
IsNameError(err error) bool
Transferer
diff --git a/plugin/dnssec/cache.go b/plugin/dnssec/cache.go
index e1f503703..bfc2dcdcf 100644
--- a/plugin/dnssec/cache.go
+++ b/plugin/dnssec/cache.go
@@ -6,7 +6,7 @@ import (
"github.com/miekg/dns"
)
-// hash serializes the RRset and return a signature cache key.
+// hash serializes the RRset and returns a signature cache key.
func hash(rrs []dns.RR) uint64 {
h := fnv.New64()
buf := make([]byte, 256)
diff --git a/plugin/dnssec/responsewriter.go b/plugin/dnssec/responsewriter.go
index 852e6f58f..355b3177b 100644
--- a/plugin/dnssec/responsewriter.go
+++ b/plugin/dnssec/responsewriter.go
@@ -9,7 +9,7 @@ import (
"github.com/miekg/dns"
)
-// ResponseWriter sign the response on the fly.
+// ResponseWriter signs the response on the fly.
type ResponseWriter struct {
dns.ResponseWriter
d Dnssec
diff --git a/plugin/dnssec/rrsig.go b/plugin/dnssec/rrsig.go
index d67cdc926..250a6035b 100644
--- a/plugin/dnssec/rrsig.go
+++ b/plugin/dnssec/rrsig.go
@@ -2,7 +2,7 @@ package dnssec
import "github.com/miekg/dns"
-// newRRSIG return a new RRSIG, with all fields filled out, except the signed data.
+// newRRSIG returns a new RRSIG, with all fields filled out, except the signed data.
func (k *DNSKEY) newRRSIG(signerName string, ttl, incep, expir uint32) *dns.RRSIG {
sig := new(dns.RRSIG)
diff --git a/plugin/dnstap/taprw/writer.go b/plugin/dnstap/taprw/writer.go
index 06e6c941d..05cf095b9 100644
--- a/plugin/dnstap/taprw/writer.go
+++ b/plugin/dnstap/taprw/writer.go
@@ -38,7 +38,7 @@ type ResponseWriter struct {
dnstapErr error
}
-// DnstapError check if a dnstap error occurred during Write and returns it.
+// DnstapError checks if a dnstap error occurred during Write and returns it.
func (w *ResponseWriter) DnstapError() error {
return w.dnstapErr
}
diff --git a/plugin/file/secondary.go b/plugin/file/secondary.go
index 6cb571fe5..160d8e013 100644
--- a/plugin/file/secondary.go
+++ b/plugin/file/secondary.go
@@ -95,7 +95,7 @@ Transfer:
return less(z.Apex.SOA.Serial, uint32(serial)), Err
}
-// less return true of a is smaller than b when taking RFC 1982 serial arithmetic into account.
+// less returns true of a is smaller than b when taking RFC 1982 serial arithmetic into account.
func less(a, b uint32) bool {
if a < b {
return (b - a) <= MaxSerialIncrement
diff --git a/plugin/forward/persistent.go b/plugin/forward/persistent.go
index afa95d343..e6cad8188 100644
--- a/plugin/forward/persistent.go
+++ b/plugin/forward/persistent.go
@@ -121,7 +121,7 @@ func (t *Transport) cleanup(all bool) {
// It is hard to pin a value to this, the import thing is to no block forever, losing at cached connection is not terrible.
const yieldTimeout = 25 * time.Millisecond
-// Yield return the connection to transport for reuse.
+// Yield returns the connection to transport for reuse.
func (t *Transport) Yield(pc *persistConn) {
pc.used = time.Now() // update used time
diff --git a/plugin/kubernetes/autopath.go b/plugin/kubernetes/autopath.go
index 6bca35d39..e87389768 100644
--- a/plugin/kubernetes/autopath.go
+++ b/plugin/kubernetes/autopath.go
@@ -49,7 +49,7 @@ func (k *Kubernetes) AutoPath(state request.Request) []string {
return search
}
-// podWithIP return the api.Pod for source IP. It returns nil if nothing can be found.
+// podWithIP returns the api.Pod for source IP. It returns nil if nothing can be found.
func (k *Kubernetes) podWithIP(ip string) *object.Pod {
if k.podMode != podModeVerified {
return nil
diff --git a/plugin/kubernetes/object/endpoint.go b/plugin/kubernetes/object/endpoint.go
index f3ce9c2d6..d4c495861 100644
--- a/plugin/kubernetes/object/endpoint.go
+++ b/plugin/kubernetes/object/endpoint.go
@@ -42,7 +42,7 @@ type EndpointPort struct {
Protocol string
}
-// EndpointsKey return a string using for the index.
+// EndpointsKey returns a string using for the index.
func EndpointsKey(name, namespace string) string { return name + "." + namespace }
// ToEndpoints returns a function that converts an *api.Endpoints to a *Endpoints.
diff --git a/plugin/kubernetes/object/service.go b/plugin/kubernetes/object/service.go
index 4c0ea6901..de84cf941 100644
--- a/plugin/kubernetes/object/service.go
+++ b/plugin/kubernetes/object/service.go
@@ -25,7 +25,7 @@ type Service struct {
*Empty
}
-// ServiceKey return a string using for the index.
+// ServiceKey returns a string using for the index.
func ServiceKey(name, namespace string) string { return name + "." + namespace }
// ToService returns a function that converts an api.Service to a *Service.
diff --git a/plugin/kubernetes/parse.go b/plugin/kubernetes/parse.go
index da8392cbe..b5801a42e 100644
--- a/plugin/kubernetes/parse.go
+++ b/plugin/kubernetes/parse.go
@@ -99,7 +99,7 @@ func stripUnderscore(s string) string {
return s[1:]
}
-// String return a string representation of r, it just returns all fields concatenated with dots.
+// String returns a string representation of r, it just returns all fields concatenated with dots.
// This is mostly used in tests.
func (r recordRequest) String() string {
s := r.port
diff --git a/plugin/rewrite/edns0.go b/plugin/rewrite/edns0.go
index 2872d089a..c8d480ba9 100644
--- a/plugin/rewrite/edns0.go
+++ b/plugin/rewrite/edns0.go
@@ -73,7 +73,7 @@ func (rule *edns0NsidRule) Rewrite(ctx context.Context, state request.Request) R
// Mode returns the processing mode.
func (rule *edns0NsidRule) Mode() string { return rule.mode }
-// GetResponseRule return a rule to rewrite the response with. Currently not implemented.
+// GetResponseRule returns a rule to rewrite the response with. Currently not implemented.
func (rule *edns0NsidRule) GetResponseRule() ResponseRule { return ResponseRule{} }
// Rewrite will alter the request EDNS0 local options.
@@ -103,7 +103,7 @@ func (rule *edns0LocalRule) Rewrite(ctx context.Context, state request.Request)
// Mode returns the processing mode.
func (rule *edns0LocalRule) Mode() string { return rule.mode }
-// GetResponseRule return a rule to rewrite the response with. Currently not implemented.
+// GetResponseRule returns a rule to rewrite the response with. Currently not implemented.
func (rule *edns0LocalRule) GetResponseRule() ResponseRule { return ResponseRule{} }
// newEdns0Rule creates an EDNS0 rule of the appropriate type based on the args
@@ -253,7 +253,7 @@ func (rule *edns0VariableRule) Rewrite(ctx context.Context, state request.Reques
// Mode returns the processing mode.
func (rule *edns0VariableRule) Mode() string { return rule.mode }
-// GetResponseRule return a rule to rewrite the response with. Currently not implemented.
+// GetResponseRule returns a rule to rewrite the response with. Currently not implemented.
func (rule *edns0VariableRule) GetResponseRule() ResponseRule { return ResponseRule{} }
func isValidVariable(variable string) bool {
diff --git a/plugin/rewrite/name.go b/plugin/rewrite/name.go
index 7a8f9ad7c..c55c7d1ff 100644
--- a/plugin/rewrite/name.go
+++ b/plugin/rewrite/name.go
@@ -245,27 +245,27 @@ func (rule *suffixNameRule) Mode() string { return rule.NextAction }
func (rule *substringNameRule) Mode() string { return rule.NextAction }
func (rule *regexNameRule) Mode() string { return rule.NextAction }
-// GetResponseRule return a rule to rewrite the response with. Currently not implemented.
+// GetResponseRule returns a rule to rewrite the response with. Currently not implemented.
func (rule *exactNameRule) GetResponseRule() ResponseRule { return rule.ResponseRule }
-// GetResponseRule return a rule to rewrite the response with. Currently not implemented.
+// GetResponseRule returns a rule to rewrite the response with. Currently not implemented.
func (rule *prefixNameRule) GetResponseRule() ResponseRule { return ResponseRule{} }
-// GetResponseRule return a rule to rewrite the response with. Currently not implemented.
+// GetResponseRule returns a rule to rewrite the response with. Currently not implemented.
func (rule *suffixNameRule) GetResponseRule() ResponseRule { return ResponseRule{} }
-// GetResponseRule return a rule to rewrite the response with. Currently not implemented.
+// GetResponseRule returns a rule to rewrite the response with. Currently not implemented.
func (rule *substringNameRule) GetResponseRule() ResponseRule { return ResponseRule{} }
-// GetResponseRule return a rule to rewrite the response with.
+// GetResponseRule returns a rule to rewrite the response with.
func (rule *regexNameRule) GetResponseRule() ResponseRule { return rule.ResponseRule }
-// hasClosingDot return true if s has a closing dot at the end.
+// hasClosingDot returns true if s has a closing dot at the end.
func hasClosingDot(s string) bool {
return strings.HasSuffix(s, ".")
}
-// getSubExprUsage return the number of subexpressions used in s.
+// getSubExprUsage returns the number of subexpressions used in s.
func getSubExprUsage(s string) int {
subExprUsage := 0
for i := 0; i <= 100; i++ {
@@ -276,7 +276,7 @@ func getSubExprUsage(s string) int {
return subExprUsage
}
-// isValidRegexPattern return a regular expression for pattern matching or errors, if any.
+// isValidRegexPattern returns a regular expression for pattern matching or errors, if any.
func isValidRegexPattern(rewriteFrom, rewriteTo string) (*regexp.Regexp, error) {
rewriteFromPattern, err := regexp.Compile(rewriteFrom)
if err != nil {
diff --git a/plugin/rewrite/ttl.go b/plugin/rewrite/ttl.go
index 59ed9f52a..50ace9c14 100644
--- a/plugin/rewrite/ttl.go
+++ b/plugin/rewrite/ttl.go
@@ -183,27 +183,27 @@ func (rule *suffixTTLRule) Mode() string { return rule.NextAction }
func (rule *substringTTLRule) Mode() string { return rule.NextAction }
func (rule *regexTTLRule) Mode() string { return rule.NextAction }
-// GetResponseRule return a rule to rewrite the response with. Currently not implemented.
+// GetResponseRule returns a rule to rewrite the response with. Currently not implemented.
func (rule *exactTTLRule) GetResponseRule() ResponseRule {
return rule.ResponseRule
}
-// GetResponseRule return a rule to rewrite the response with. Currently not implemented.
+// GetResponseRule returns a rule to rewrite the response with. Currently not implemented.
func (rule *prefixTTLRule) GetResponseRule() ResponseRule {
return rule.ResponseRule
}
-// GetResponseRule return a rule to rewrite the response with. Currently not implemented.
+// GetResponseRule returns a rule to rewrite the response with. Currently not implemented.
func (rule *suffixTTLRule) GetResponseRule() ResponseRule {
return rule.ResponseRule
}
-// GetResponseRule return a rule to rewrite the response with. Currently not implemented.
+// GetResponseRule returns a rule to rewrite the response with. Currently not implemented.
func (rule *substringTTLRule) GetResponseRule() ResponseRule {
return rule.ResponseRule
}
-// GetResponseRule return a rule to rewrite the response with.
+// GetResponseRule returns a rule to rewrite the response with.
func (rule *regexTTLRule) GetResponseRule() ResponseRule {
return rule.ResponseRule
}
diff --git a/plugin/test/helpers.go b/plugin/test/helpers.go
index eff5ed550..21fb277c0 100644
--- a/plugin/test/helpers.go
+++ b/plugin/test/helpers.go
@@ -112,7 +112,7 @@ func OPT(bufsize int, do bool) *dns.OPT {
return o
}
-// Header test if the header in resp matches the header as defined in tc.
+// Header tests if the header in resp matches the header as defined in tc.
func Header(tc Case, resp *dns.Msg) error {
if resp.Rcode != tc.Rcode {
return fmt.Errorf("rcode is %q, expected %q", dns.RcodeToString[resp.Rcode], dns.RcodeToString[tc.Rcode])
diff --git a/plugin/test/responsewriter.go b/plugin/test/responsewriter.go
index ce75657ce..c66b0c969 100644
--- a/plugin/test/responsewriter.go
+++ b/plugin/test/responsewriter.go
@@ -38,22 +38,22 @@ func (t *ResponseWriter) RemoteAddr() net.Addr {
return &net.UDPAddr{IP: ip, Port: port, Zone: ""}
}
-// WriteMsg implement dns.ResponseWriter interface.
+// WriteMsg implements dns.ResponseWriter interface.
func (t *ResponseWriter) WriteMsg(m *dns.Msg) error { return nil }
-// Write implement dns.ResponseWriter interface.
+// Write implements dns.ResponseWriter interface.
func (t *ResponseWriter) Write(buf []byte) (int, error) { return len(buf), nil }
-// Close implement dns.ResponseWriter interface.
+// Close implements dns.ResponseWriter interface.
func (t *ResponseWriter) Close() error { return nil }
-// TsigStatus implement dns.ResponseWriter interface.
+// TsigStatus implements dns.ResponseWriter interface.
func (t *ResponseWriter) TsigStatus() error { return nil }
-// TsigTimersOnly implement dns.ResponseWriter interface.
+// TsigTimersOnly implements dns.ResponseWriter interface.
func (t *ResponseWriter) TsigTimersOnly(bool) {}
-// Hijack implement dns.ResponseWriter interface.
+// Hijack implements dns.ResponseWriter interface.
func (t *ResponseWriter) Hijack() {}
// ResponseWriter6 returns fixed client and remote address in IPv6. The remote
diff --git a/plugin/test/scrape.go b/plugin/test/scrape.go
index cb8a4cdb0..3fb6b26d5 100644
--- a/plugin/test/scrape.go
+++ b/plugin/test/scrape.go
@@ -77,7 +77,7 @@ func Scrape(url string) []*MetricFamily {
return result
}
-// ScrapeMetricAsInt provide a sum of all metrics collected for the name and label provided.
+// ScrapeMetricAsInt provides a sum of all metrics collected for the name and label provided.
// if the metric is not a numeric value, it will be counted a 0.
func ScrapeMetricAsInt(addr string, name string, label string, nometricvalue int) int {