Remove reflect middleware - it was only a toy

This commit is contained in:
Miek Gieben
2016-03-23 10:54:50 +00:00
parent 15518b5b6f
commit 7d834ce037
4 changed files with 2 additions and 118 deletions

View File

@@ -1,28 +0,0 @@
package setup
import (
"github.com/miekg/coredns/middleware"
"github.com/miekg/coredns/middleware/reflect"
)
// Reflect sets up the reflect middleware.
func Reflect(c *Controller) (middleware.Middleware, error) {
if err := reflectParse(c); err != nil {
return nil, err
}
return func(next middleware.Handler) middleware.Handler {
return reflect.Reflect{Next: next}
}, nil
}
func reflectParse(c *Controller) error {
for c.Next() {
if c.Val() == "reflect" {
if c.NextArg() {
return c.ArgErr()
}
}
}
return nil
}