aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/plugin/zplugin.go (renamed from core/zplugin.go)2
-rw-r--r--coredns.go7
-rw-r--r--coremain/run.go3
-rw-r--r--directives_generate.go2
-rw-r--r--test/plugin_test.go3
5 files changed, 11 insertions, 6 deletions
diff --git a/core/zplugin.go b/core/plugin/zplugin.go
index ee9a96fac..478746455 100644
--- a/core/zplugin.go
+++ b/core/plugin/zplugin.go
@@ -1,6 +1,6 @@
// generated by directives_generate.go; DO NOT EDIT
-package core
+package plugin
import (
// Include all plugins.
diff --git a/coredns.go b/coredns.go
index aa9e20818..5b3fa2b8f 100644
--- a/coredns.go
+++ b/coredns.go
@@ -2,7 +2,12 @@ package main
//go:generate go run directives_generate.go
-import "github.com/coredns/coredns/coremain"
+import (
+ "github.com/coredns/coredns/coremain"
+
+ // Plug in CoreDNS
+ _ "github.com/coredns/coredns/core/plugin"
+)
func main() {
coremain.Run()
diff --git a/coremain/run.go b/coremain/run.go
index b0d83b695..de00d1c5f 100644
--- a/coremain/run.go
+++ b/coremain/run.go
@@ -15,9 +15,6 @@ import (
"github.com/mholt/caddy"
"github.com/coredns/coredns/core/dnsserver"
-
- // Plug in CoreDNS
- _ "github.com/coredns/coredns/core"
)
func init() {
diff --git a/directives_generate.go b/directives_generate.go
index ece92e329..3c1c0214b 100644
--- a/directives_generate.go
+++ b/directives_generate.go
@@ -48,7 +48,7 @@ func main() {
}
}
- genImports("core/zplugin.go", "core", mi)
+ genImports("core/plugin/zplugin.go", "plugin", mi)
genDirectives("core/dnsserver/zdirectives.go", "dnsserver", md)
}
diff --git a/test/plugin_test.go b/test/plugin_test.go
index 9f3604e4e..c2382873c 100644
--- a/test/plugin_test.go
+++ b/test/plugin_test.go
@@ -8,6 +8,9 @@ import (
"github.com/coredns/coredns/plugin/test"
"github.com/miekg/dns"
+
+ // Load all managed plugins in github.com/coredns/coredns
+ _ "github.com/coredns/coredns/core/plugin"
)
func benchmarkLookupBalanceRewriteCache(b *testing.B) {