From b3c21061fe743d2b2674089e32c27390b8942740 Mon Sep 17 00:00:00 2001 From: Bo-Yi Wu Date: Sun, 26 Nov 2023 09:17:50 +0800 Subject: [PATCH] chore: remove gitter chat badge and update options in codebase - Remove the gitter chat badge from the README.md file - Add two lines of code to the options.go file Signed-off-by: Bo-Yi Wu --- README.md | 1 - options.go | 2 ++ 2 files changed, 2 insertions(+), 1 deletion(-) 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) }