• Miek Gieben's avatar
    all: simply registering plugins (#3287) · 004c5fca
    Miek Gieben authored
    Abstract the caddy call and make it simpler.
    
    See #3261 for some part of the discussion.
    
    Go from:
    
    ~~~ go
    func init() {
           caddy.RegisterPlugin("any", caddy.Plugin{
                   ServerType: "dns",
                   Action:     setup,
           })
    }
    ~~~
    
    To:
    
    ~~~ go
    func init() { plugin.Register("any", setup) }
    ~~~
    
    This requires some external documents in coredns.io to be updated as
    well; the old way still works, so it's backwards compatible.
    Signed-off-by: default avatarMiek Gieben <miek@miek.nl>
    004c5fca
setup.go 1.46 KB