diff --git a/private/buf/bufcli/bufcli.go b/private/buf/bufcli/bufcli.go index 30c8007d47..c4e82de325 100644 --- a/private/buf/bufcli/bufcli.go +++ b/private/buf/bufcli/bufcli.go @@ -172,17 +172,6 @@ var ( } ) -// GlobalFlags contains global flags for buf commands. -type GlobalFlags struct{} - -// NewGlobalFlags creates a new GlobalFlags with default values.. -func NewGlobalFlags() *GlobalFlags { - return &GlobalFlags{} -} - -// BindRoot binds the global flags to the root command flag set. -func (*GlobalFlags) BindRoot(*pflag.FlagSet) {} - // BindAsFileDescriptorSet binds the exclude-imports flag. func BindAsFileDescriptorSet(flagSet *pflag.FlagSet, addr *bool, flagName string) { flagSet.BoolVar( diff --git a/private/buf/cmd/buf/buf.go b/private/buf/cmd/buf/buf.go index 7a8de4f827..59abc77963 100644 --- a/private/buf/cmd/buf/buf.go +++ b/private/buf/cmd/buf/buf.go @@ -92,13 +92,12 @@ func NewRootCommand(name string) *appcmd.Command { appflag.BuilderWithTimeout(120*time.Second), appflag.BuilderWithTracing(), ) - globalFlags := bufcli.NewGlobalFlags() return &appcmd.Command{ Use: name, Short: "The Buf CLI", Long: "A tool for working with Protocol Buffers and managing resources on the Buf Schema Registry (BSR)", Version: bufcli.Version, - BindPersistentFlags: appcmd.BindMultiple(builder.BindRoot, globalFlags.BindRoot), + BindPersistentFlags: builder.BindRoot, SubCommands: []*appcmd.Command{ build.NewCommand("build", builder), export.NewCommand("export", builder),