Skip to content

Commit

Permalink
Fix deprecated flag casing for flags (#3201)
Browse files Browse the repository at this point in the history
Lowercase the remaining deprecated flags to fix sentence structure.
  • Loading branch information
emcfarlane authored Jul 31, 2024
1 parent bcc862d commit 9d58407
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion private/buf/cmd/buf/command/generate/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down
4 changes: 2 additions & 2 deletions private/buf/cmd/buf/command/lsfiles/lsfiles.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,15 +138,15 @@ 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,
asImportPathsFlagName,
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)
}

Expand Down
2 changes: 1 addition & 1 deletion private/buf/cmd/buf/command/push/push.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 9d58407

Please sign in to comment.