diff --git a/control/register.go b/control/register.go index 4656eb602c..21c08a9823 100644 --- a/control/register.go +++ b/control/register.go @@ -6,7 +6,6 @@ import ( func Register(service string, o *Options) *zero.Engine { engine := zero.New() - m := *New(service, o) - engine.UsePreHandler(m.Handler()) + engine.UsePreHandler(New(service, o).Handler()) return engine }