From 9077115c44256e147e343ef1a2850cd9ba3971f9 Mon Sep 17 00:00:00 2001 From: mansoora Date: Thu, 9 Jan 2025 22:19:53 +0530 Subject: [PATCH] fix for #19066 Print warnings when deprecated options are configured in config file Signed-off-by: mansoora --- server/etcdmain/config.go | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/server/etcdmain/config.go b/server/etcdmain/config.go index 82ea97a939d..5955d8b772b 100644 --- a/server/etcdmain/config.go +++ b/server/etcdmain/config.go @@ -182,20 +182,6 @@ func (cfg *config) parse(arguments []string) error { return perr } - var warningsForDeprecatedFlags []string - cfg.cf.flagSet.Visit(func(f *flag.Flag) { - if msg, ok := deprecatedFlags[f.Name]; ok { - warningsForDeprecatedFlags = append(warningsForDeprecatedFlags, msg) - } - }) - if len(warningsForDeprecatedFlags) > 0 { - if lg := cfg.ec.GetLogger(); lg != nil { - for _, msg := range warningsForDeprecatedFlags { - lg.Warn(msg) - } - } - } - // now logger is set up return err }