From 05ec684fbcb49ec12c3a0d13474d5f67b0f9c605 Mon Sep 17 00:00:00 2001 From: Markus Meyer Date: Tue, 27 Feb 2024 15:16:09 +0100 Subject: [PATCH] Expose FlagSet to callers Signed-off-by: Markus Meyer --- config/config.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/config/config.go b/config/config.go index 3f7cf0963a..174d8a785f 100644 --- a/config/config.go +++ b/config/config.go @@ -604,6 +604,12 @@ func validate(c *Config) error { return c.parseForwardedHeaders() } +// Flags returns the flag.FlagSet used by skipper. +// Users can add custom flags to the FlagSet before calling Parse(). +func (c *Config) Flags() *flag.FlagSet { + return c.flags +} + func (c *Config) Parse() error { return c.ParseArgs(os.Args[0], os.Args[1:]) }