From 9d5840767d4eeedade06c077e4a9cd9238a64b42 Mon Sep 17 00:00:00 2001 From: Edward McFarlane <3036610+emcfarlane@users.noreply.github.com> Date: Wed, 31 Jul 2024 18:02:45 +0200 Subject: [PATCH] Fix deprecated flag casing for flags (#3201) Lowercase the remaining deprecated flags to fix sentence structure. --- private/buf/cmd/buf/command/generate/generate.go | 2 +- private/buf/cmd/buf/command/lsfiles/lsfiles.go | 4 ++-- private/buf/cmd/buf/command/push/push.go | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/private/buf/cmd/buf/command/generate/generate.go b/private/buf/cmd/buf/command/generate/generate.go index daa8297ead..ded5bfdb8d 100644 --- a/private/buf/cmd/buf/command/generate/generate.go +++ b/private/buf/cmd/buf/command/generate/generate.go @@ -460,7 +460,7 @@ func (f *flags) Bind(flagSet *pflag.FlagSet) { nil, "The types (package, message, enum, extension, service, method) that should be included in this image. When specified, the resulting image will only include descriptors to describe the requested types. Flag usage overrides buf.gen.yaml", ) - _ = flagSet.MarkDeprecated(typeDeprecatedFlagName, fmt.Sprintf("Use --%s instead", typeFlagName)) + _ = flagSet.MarkDeprecated(typeDeprecatedFlagName, fmt.Sprintf("use --%s instead", typeFlagName)) _ = flagSet.MarkHidden(typeDeprecatedFlagName) } diff --git a/private/buf/cmd/buf/command/lsfiles/lsfiles.go b/private/buf/cmd/buf/command/lsfiles/lsfiles.go index 12e6b8db0a..2ffee8d723 100644 --- a/private/buf/cmd/buf/command/lsfiles/lsfiles.go +++ b/private/buf/cmd/buf/command/lsfiles/lsfiles.go @@ -138,7 +138,7 @@ func (f *flags) Bind(flagSet *pflag.FlagSet) { stringutil.SliceToString(bufanalysis.AllFormatStrings), ), ) - _ = flagSet.MarkDeprecated(errorFormatFlagName, "This flag no longer has any effect") + _ = flagSet.MarkDeprecated(errorFormatFlagName, "this flag no longer has any effect") _ = flagSet.MarkHidden(errorFormatFlagName) flagSet.BoolVar( &f.AsImportPaths, @@ -146,7 +146,7 @@ func (f *flags) Bind(flagSet *pflag.FlagSet) { false, "Strip local directory paths and print filepaths as they are imported", ) - _ = flagSet.MarkDeprecated(asImportPathsFlagName, fmt.Sprintf("Use --%s=import instead", formatFlagName)) + _ = flagSet.MarkDeprecated(asImportPathsFlagName, fmt.Sprintf("use --%s=import instead", formatFlagName)) _ = flagSet.MarkHidden(asImportPathsFlagName) } diff --git a/private/buf/cmd/buf/command/push/push.go b/private/buf/cmd/buf/command/push/push.go index d14f7de9a2..45357b41f2 100644 --- a/private/buf/cmd/buf/command/push/push.go +++ b/private/buf/cmd/buf/command/push/push.go @@ -59,7 +59,7 @@ const ( ) var ( - useLabelInstead = fmt.Sprintf("Use --%s instead.", labelFlagName) + useLabelInstead = fmt.Sprintf("use --%s instead.", labelFlagName) ) // NewCommand returns a new Command.