aboutsummaryrefslogtreecommitdiff
path: root/plugin/plugin.go
diff options
context:
space:
mode:
authorGravatar Soumya Ghosh Dastidar <44349253+gdsoumya@users.noreply.github.com> 2021-03-15 20:07:55 +0530
committerGravatar GitHub <noreply@github.com> 2021-03-15 15:37:55 +0100
commit7651e6c4de38a1f41dc8bacba16656ef4fbcd008 (patch)
tree4672412c5d5aec9914cbde68a4ea26eda35c2427 /plugin/plugin.go
parent74ef6e00f189e6590185d0625d8cc0767511de46 (diff)
downloadcoredns-7651e6c4de38a1f41dc8bacba16656ef4fbcd008.tar.gz
coredns-7651e6c4de38a1f41dc8bacba16656ef4fbcd008.tar.zst
coredns-7651e6c4de38a1f41dc8bacba16656ef4fbcd008.zip
Added minimal-responses plugin (#4417)
* Added minimal-responses plugin Signed-off-by: Soumya Ghosh Dastidar <gdsoumya@gmail.com> * Removed unnecessary comments * Updated tests Signed-off-by: Soumya Ghosh Dastidar <gdsoumya@gmail.com> * Reformated imports Signed-off-by: Soumya Ghosh Dastidar <gdsoumya@gmail.com> * Updated package name Signed-off-by: Soumya Ghosh Dastidar <gdsoumya@gmail.com> * Removed unnecessary comments Co-authored-by: Miek Gieben <miek@miek.nl> * Added changes Signed-off-by: Soumya Ghosh Dastidar <gdsoumya@gmail.com> * updated Signed-off-by: Soumya Ghosh Dastidar <gdsoumya@gmail.com> * Updated comment for NextOrFailure Signed-off-by: Soumya Ghosh Dastidar <gdsoumya@gmail.com> * Updated to test.Case for testing Signed-off-by: Soumya Ghosh Dastidar <gdsoumya@gmail.com> * Formated imports using goimports Signed-off-by: Soumya Ghosh Dastidar <gdsoumya@gmail.com> Co-authored-by: Miek Gieben <miek@miek.nl>
Diffstat (limited to 'plugin/plugin.go')
-rw-r--r--plugin/plugin.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugin/plugin.go b/plugin/plugin.go
index ee1bf8429..9bac48885 100644
--- a/plugin/plugin.go
+++ b/plugin/plugin.go
@@ -69,7 +69,7 @@ func (f HandlerFunc) Name() string { return "handlerfunc" }
// Error returns err with 'plugin/name: ' prefixed to it.
func Error(name string, err error) error { return fmt.Errorf("%s/%s: %s", "plugin", name, err) }
-// NextOrFailure calls next.ServeDNS when next is not nil, otherwise it will return, a ServerFailure and a nil error.
+// NextOrFailure calls next.ServeDNS when next is not nil, otherwise it will return, a ServerFailure and a `no next plugin found` error.
func NextOrFailure(name string, next Handler, ctx context.Context, w dns.ResponseWriter, r *dns.Msg) (int, error) { // nolint: golint
if next != nil {
if span := ot.SpanFromContext(ctx); span != nil {