diff --git a/graceful.go b/graceful.go index 69f6c45..d06e548 100644 --- a/graceful.go +++ b/graceful.go @@ -41,6 +41,8 @@ type listenAndServe func() error // cleanup is a function type that performs cleanup operations. type cleanup func() +var donothing cleanup = func() {} + // Default returns a Graceful gin instance with the Logger and Recovery middleware already attached. func Default(opts ...Option) (*Graceful, error) { return New(gin.Default(), opts...) diff --git a/options.go b/options.go index e26dc8a..da49b71 100644 --- a/options.go +++ b/options.go @@ -118,5 +118,3 @@ func listen(g *Graceful, l net.Listener, close cleanup) (listenAndServe, cleanup close() }, nil } - -func donothing() {}