diff --git a/README.md b/README.md index e8b644f..250fb67 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,6 @@ [![codecov](https://codecov.io/gh/gin-contrib/graceful/branch/master/graph/badge.svg)](https://codecov.io/gh/gin-contrib/graceful) [![Go Report Card](https://goreportcard.com/badge/github.com/gin-contrib/graceful)](https://goreportcard.com/report/github.com/gin-contrib/graceful) [![GoDoc](https://godoc.org/github.com/gin-contrib/graceful?status.svg)](https://godoc.org/github.com/gin-contrib/graceful) -[![Join the chat at https://gitter.im/gin-gonic/gin](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/gin-gonic/gin) Gin wrapper to enable graceful termination when shutting down a process diff --git a/options.go b/options.go index cc4eaeb..054e46d 100644 --- a/options.go +++ b/options.go @@ -15,6 +15,8 @@ var _ Option = (*optionFunc)(nil) type optionFunc func(*Graceful) (listenAndServe, cleanup, error) +// apply applies the option function to the Graceful instance. +// It returns the listenAndServe function, cleanup function, and an error, if any. func (o optionFunc) apply(g *Graceful) (listenAndServe, cleanup, error) { return o(g) }