Explorar o código

Update plugin name

Oz Tiram %!s(int64=4) %!d(string=hai) anos
pai
achega
993f837484
Modificáronse 2 ficheiros con 4 adicións e 4 borrados
  1. 2 2
      example.go
  2. 2 2
      setup.go

+ 2 - 2
example.go

@@ -18,7 +18,7 @@ import (
 
 // Define log to be a logger with the plugin name in it. This way we can just use log.Info and
 // friends to log.
-var log = clog.NewWithPlugin("example")
+var log = clog.NewWithPlugin("bumple")
 
 // Example is an example plugin to show how to write a plugin.
 type Example struct {
@@ -48,7 +48,7 @@ func (e Example) ServeDNS(ctx context.Context, w dns.ResponseWriter, r *dns.Msg)
 }
 
 // Name implements the Handler interface.
-func (e Example) Name() string { return "example" }
+func (e Example) Name() string { return "bumple" }
 
 // ResponsePrinter wrap a dns.ResponseWriter and will write example to standard output when WriteMsg is called.
 type ResponsePrinter struct {

+ 2 - 2
setup.go

@@ -9,7 +9,7 @@ import (
 )
 
 // init registers this plugin.
-func init() { plugin.Register("example", setup) }
+func init() { plugin.Register("bumple", setup) }
 
 // setup is the function that gets called when the config parser see the token "example". Setup is responsible
 // for parsing any extra options the example plugin may have. The first token this function sees is "example".
@@ -19,7 +19,7 @@ func setup(c *caddy.Controller) error {
 		// If there was another token, return an error, because we don't have any configuration.
 		// Any errors returned from this setup function should be wrapped with plugin.Error, so we
 		// can present a slightly nicer error message to the user.
-		return plugin.Error("example", c.ArgErr())
+		return plugin.Error("bumple", c.ArgErr())
 	}
 
 	// Add a startup function that will -- after all plugins have been loaded -- check if the