doc: some function/vars/const/package level updates (#1558)
* doc: some function/vars/const/package level updates Various update that stood out while reading godoc.org for CoreDNS. * Fix some misspellings as well
This commit is contained in:
parent
e3b7beab6a
commit
455040c143
9 changed files with 12 additions and 8 deletions
|
@ -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) {
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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"})
|
||||
)
|
||||
|
||||
|
|
|
@ -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()))
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// Package fuzz contains functions that enable fuzzing of plugins.
|
||||
package fuzz
|
||||
|
||||
import (
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
// Package parse contains functions that can be used in the setup code for plugins.
|
||||
package parse
|
||||
|
||||
import (
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 (
|
||||
|
|
|
@ -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 (
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue