plugins: calling Dispenser itself is a mistake (#3323)

Remove all these uses and just make them work on caddy.Controller. Also
don't export parsing functions as their should be private to the plugin.

Signed-off-by: Miek Gieben <miek@miek.nl>
This commit is contained in:
Miek Gieben
2019-09-28 10:41:12 +01:00
committed by GitHub
parent ba5d4a6372
commit 03a3695ea9
4 changed files with 9 additions and 13 deletions

View File

@@ -21,7 +21,7 @@ func TestConfig(t *testing.T) {
}
for _, c := range tests {
cad := caddy.NewTestController("dns", c.file)
conf, err := parseConfig(&cad.Dispenser)
conf, err := parseConfig(cad)
if c.fail {
if err == nil {
t.Errorf("%s: %s", c.file, err)