From 0459ea0613112bf8f4df850b0a68c8030335eb20 Mon Sep 17 00:00:00 2001 From: Vasiliy Tolstov Date: Thu, 29 Feb 2024 22:40:05 +0300 Subject: [PATCH] fixup Signed-off-by: Vasiliy Tolstov --- server/options.go | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/server/options.go b/server/options.go index 45f9a612..32a5f60d 100644 --- a/server/options.go +++ b/server/options.go @@ -321,22 +321,19 @@ func Listener(l net.Listener) Option { } } -<<<<<<< HEAD // HandlerOption func type HandlerOption func(*HandlerOptions) -// HandlerOptions struct -type HandlerOptions struct { -======= -func GracefulTimeout(t time.Duration) options.Option { - return func(src interface{}) error { - return options.Set(src, t, ".GracefulTimeout") +// GracefulTimeout duration +func GracefulTimeout(td time.Duration) options.Option { + return func(o *Options) { + o.GracefulTimeout = td } } -// HandleOptions struct -type HandleOptions struct { ->>>>>>> bf0c3016cb09 (add gracefultimeout in server) + +// HandlerOptions struct +type HandlerOptions struct { // Context holds external options Context context.Context // Metadata for handler