mirror of
https://github.com/coredns/coredns.git
synced 2025-11-23 20:24:02 -05:00
just use setup (#1574)
All these functions are namespaced by their package anyway; just use setup().
This commit is contained in:
@@ -6,6 +6,6 @@ import "github.com/mholt/caddy"
|
||||
func init() {
|
||||
caddy.RegisterPlugin("bind", caddy.Plugin{
|
||||
ServerType: "dns",
|
||||
Action: setupBind,
|
||||
Action: setup,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
"github.com/mholt/caddy"
|
||||
)
|
||||
|
||||
func TestSetupBind(t *testing.T) {
|
||||
func TestSetup(t *testing.T) {
|
||||
for i, test := range []struct {
|
||||
config string
|
||||
expected []string
|
||||
@@ -22,7 +22,7 @@ func TestSetupBind(t *testing.T) {
|
||||
{`bind ::1 1.2.3.4 ::5 127.9.9.0 noone`, nil, true},
|
||||
} {
|
||||
c := caddy.NewTestController("dns", test.config)
|
||||
err := setupBind(c)
|
||||
err := setup(c)
|
||||
if err != nil {
|
||||
if !test.failing {
|
||||
t.Fatalf("test %d, expected no errors, but got: %v", i, err)
|
||||
|
||||
@@ -10,7 +10,7 @@ import (
|
||||
"github.com/mholt/caddy"
|
||||
)
|
||||
|
||||
func setupBind(c *caddy.Controller) error {
|
||||
func setup(c *caddy.Controller) error {
|
||||
config := dnsserver.GetConfig(c)
|
||||
|
||||
// addresses will be consolidated over all BIND directives available in that BlocServer
|
||||
|
||||
Reference in New Issue
Block a user