From 095dd1385f189c4cf407953aad61958208ed8cd2 Mon Sep 17 00:00:00 2001 From: Lorain <87760338+justlorain@users.noreply.github.com> Date: Sun, 3 Dec 2023 12:33:58 +0800 Subject: [PATCH] feat: add WithExcludedPathsRegexs option for aligning (#15) --- options.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/options.go b/options.go index 91ca46c..7f6e6d1 100644 --- a/options.go +++ b/options.go @@ -102,6 +102,14 @@ func WithExcludedPathRegexes(args []string) Option { } } +// WithExcludedPathsRegexs customize path's regexes +// NOTE: WithExcludedPathRegexs is exactly same as WithExcludedPathRegexes, this just for aligning with gin +func WithExcludedPathsRegexs(args []string) Option { + return func(o *Options) { + o.ExcludedPathRegexes = NewExcludedPathRegexes(args) + } +} + func WithExcludedPaths(args []string) Option { return func(o *Options) { o.ExcludedPaths = NewExcludedPaths(args)