func Register(plugin Plugin, opts ...PluginOption) error {
	return defaultManager.Register(plugin, opts...)
}
Register registers a global plugins
package plugin
import (
	"net/http"
	"github.com/urfave/cli/v2"
)
type Plugin interface {
	Flags() []cli.Flag
	Commands() []*cli.Command
	Handler() Handler
	Init(*cli.Context) error
	String() string
}
type Manager interface {
	Plugins(...PluginOption) []Plugin
	Register(Plugin, ...PluginOption) error
}
type PluginOptions struct {
	Module string
}
type PluginOption func(o *PluginOptions)
func Module(m string) PluginOption {
	return func(o *PluginOptions) {
		o.Module = m
	}
}
type Handler func(http.Handler) http.Handler
type plugin struct {
	opts    Options
	init    func(ctx *cli.Context) error
	handler Handler
}
func (p *plugin) Flags() []cli.Flag {
	return p.opts.Flags
}
func (p *plugin) Commands() []*cli.Command {
	return p.opts.Commands
}
func (p *plugin) Handler() Handler {
	return p.handler
}
func (p *plugin) Init(ctx *cli.Context) error {
	return p.opts.Init(ctx)
}
func (p *plugin) String() string {
	return p.opts.Name
}
func newPlugin(opts ...Option) Plugin {
	options := Options{
		Name: "default",
		Init: func(ctx *cli.Context) error { return nil },
	}
	for _, o := range opts {
		o(&options)
	}
	handler := func(hdlr http.Handler) http.Handler {
		for _, h := range options.Handlers {
			hdlr = h(hdlr)
		}
		return hdlr
	}
	return &plugin{
		opts:    options,
		handler: handler,
	}
}
func Plugins(opts ...PluginOption) []Plugin {
	return defaultManager.Plugins(opts...)
}