aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--middleware/canonical.go2
-rw-r--r--middleware/chaos/chaos.go4
-rw-r--r--middleware/replacer.go2
-rw-r--r--middleware/state.go4
4 files changed, 7 insertions, 5 deletions
diff --git a/middleware/canonical.go b/middleware/canonical.go
index 9dacba78c..5806426ab 100644
--- a/middleware/canonical.go
+++ b/middleware/canonical.go
@@ -11,7 +11,7 @@ import (
// The function orders names in DNSSEC canonical order: RFC 4034s section-6.1
//
// See http://bert-hubert.blogspot.co.uk/2015/10/how-to-do-fast-canonical-ordering-of.html
-// for a blog article on this implementation:
+// for a blog article on this implementation.
func Less(a, b string) int {
i := 1
aj := len(a)
diff --git a/middleware/chaos/chaos.go b/middleware/chaos/chaos.go
index 0064e4f94..f668d9a4d 100644
--- a/middleware/chaos/chaos.go
+++ b/middleware/chaos/chaos.go
@@ -9,10 +9,12 @@ import (
"golang.org/x/net/context"
)
+// Chaos allows CoreDNS to reply to CH TXT queries and return author or
+// version information.
type Chaos struct {
Next middleware.Handler
Version string
- Authors map[string]bool // get randomization for free \o/
+ Authors map[string]bool
}
func (c Chaos) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (int, error) {
diff --git a/middleware/replacer.go b/middleware/replacer.go
index b9ea26745..c1f377d6e 100644
--- a/middleware/replacer.go
+++ b/middleware/replacer.go
@@ -10,7 +10,7 @@ import (
// Replacer is a type which can replace placeholder
// substrings in a string with actual values from a
-// http.Request and responseRecorder. Always use
+// dns.Msg and responseRecorder. Always use
// NewReplacer to get one of these.
type Replacer interface {
Replace(string) string
diff --git a/middleware/state.go b/middleware/state.go
index 406fa4ac3..2a7b2ac1d 100644
--- a/middleware/state.go
+++ b/middleware/state.go
@@ -144,7 +144,7 @@ func (s *State) SizeAndDo() *dns.OPT {
return o
}
-// Result is the result of Fit.
+// Result is the result of Scrub.
type Result int
const (
@@ -180,7 +180,7 @@ func (s *State) Scrub(reply *dns.Msg) (*dns.Msg, Result) {
// Type returns the type of the question as a string.
func (s *State) Type() string { return dns.Type(s.Req.Question[0].Qtype).String() }
-// QType returns the type of the question as a uint16.
+// QType returns the type of the question as an uint16.
func (s *State) QType() uint16 { return s.Req.Question[0].Qtype }
// Name returns the name of the question in the request. Note