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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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)