aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/dnsserver/address.go2
-rw-r--r--coremain/run.go4
-rw-r--r--plugin/forward/metrics.go2
-rw-r--r--plugin/forward/setup.go2
-rw-r--r--plugin/pkg/fuzz/do.go1
-rw-r--r--plugin/pkg/parse/parse.go1
-rw-r--r--plugin/pkg/rcode/rcode.go3
-rw-r--r--plugin/pkg/up/up.go2
-rw-r--r--request/request.go3
9 files changed, 12 insertions, 8 deletions
diff --git a/core/dnsserver/address.go b/core/dnsserver/address.go
index eb2d0f049..75f56ded9 100644
--- a/core/dnsserver/address.go
+++ b/core/dnsserver/address.go
@@ -73,7 +73,7 @@ func normalizeZone(str string) (zoneAddr, error) {
return zoneAddr{Zone: dns.Fqdn(host), Port: port, Transport: trans, IPNet: ipnet}, nil
}
-// SplitProtocolHostPort - split a full formed address like "dns://[::1}:53" into parts
+// SplitProtocolHostPort splits a full formed address like "dns://[::1]:53" into parts.
func SplitProtocolHostPort(address string) (protocol string, ip string, port string, err error) {
parts := strings.Split(address, "://")
switch len(parts) {
diff --git a/coremain/run.go b/coremain/run.go
index 23d5d5f7e..534ebb607 100644
--- a/coremain/run.go
+++ b/coremain/run.go
@@ -251,9 +251,11 @@ var (
buildDate string // date -u
gitTag string // git describe --exact-match HEAD 2> /dev/null
gitNearestTag string // git describe --abbrev=0 --tags HEAD
- GitCommit string // git rev-parse HEAD
gitShortStat string // git diff-index --shortstat
gitFilesModified string // git diff-index --name-only HEAD
+
+ // Gitcommit contains the commit where we built CoreDNS from.
+ GitCommit string
)
// flagsBlacklist removes flags with these names from our flagset.
diff --git a/plugin/forward/metrics.go b/plugin/forward/metrics.go
index 1e72454e0..b0368f722 100644
--- a/plugin/forward/metrics.go
+++ b/plugin/forward/metrics.go
@@ -45,7 +45,7 @@ var (
Namespace: plugin.Namespace,
Subsystem: "forward",
Name: "socket_count_total",
- Help: "Guage of open sockets per upstream.",
+ Help: "Gauge of open sockets per upstream.",
}, []string{"to"})
)
diff --git a/plugin/forward/setup.go b/plugin/forward/setup.go
index 5231bcc22..779d085ae 100644
--- a/plugin/forward/setup.go
+++ b/plugin/forward/setup.go
@@ -25,7 +25,7 @@ func init() {
func setup(c *caddy.Controller) error {
f, err := parseForward(c)
if err != nil {
- return plugin.Error("foward", err)
+ return plugin.Error("forward", err)
}
if f.Len() > max {
return plugin.Error("forward", fmt.Errorf("more than %d TOs configured: %d", max, f.Len()))
diff --git a/plugin/pkg/fuzz/do.go b/plugin/pkg/fuzz/do.go
index 920e8feb7..d4ef87117 100644
--- a/plugin/pkg/fuzz/do.go
+++ b/plugin/pkg/fuzz/do.go
@@ -1,3 +1,4 @@
+// Package fuzz contains functions that enable fuzzing of plugins.
package fuzz
import (
diff --git a/plugin/pkg/parse/parse.go b/plugin/pkg/parse/parse.go
index cf4f96c09..17d2641ef 100644
--- a/plugin/pkg/parse/parse.go
+++ b/plugin/pkg/parse/parse.go
@@ -1,3 +1,4 @@
+// Package parse contains functions that can be used in the setup code for plugins.
package parse
import (
diff --git a/plugin/pkg/rcode/rcode.go b/plugin/pkg/rcode/rcode.go
index 32863f0b2..d221bcbd2 100644
--- a/plugin/pkg/rcode/rcode.go
+++ b/plugin/pkg/rcode/rcode.go
@@ -6,8 +6,7 @@ import (
"github.com/miekg/dns"
)
-// ToString convert the rcode to the official DNS string, or to "RCODE"+value if the RCODE
-// value is unknown.
+// ToString convert the rcode to the official DNS string, or to "RCODE"+value if the RCODE value is unknown.
func ToString(rcode int) string {
if str, ok := dns.RcodeToString[rcode]; ok {
return str
diff --git a/plugin/pkg/up/up.go b/plugin/pkg/up/up.go
index 06971eef7..34b23fdad 100644
--- a/plugin/pkg/up/up.go
+++ b/plugin/pkg/up/up.go
@@ -1,3 +1,5 @@
+// Package up is used to run a function for some duration. If a new function is added while a previous run is
+// still ongoing, nothing new will be executed.
package up
import (
diff --git a/request/request.go b/request/request.go
index 1105f919a..0ce341a1b 100644
--- a/request/request.go
+++ b/request/request.go
@@ -1,5 +1,4 @@
-// Package request abstracts a client's request so that all plugin
-// will handle them in an unified way.
+// Package request abstracts a client's request so that all plugins will handle them in an unified way.
package request
import (