Skip to content

Commit

Permalink
Delete bufcli.GlobalFlags (#2288)
Browse files Browse the repository at this point in the history
  • Loading branch information
bufdev authored Jul 13, 2023
1 parent 447b808 commit 74ade48
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 13 deletions.
11 changes: 0 additions & 11 deletions private/buf/bufcli/bufcli.go
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
3 changes: 1 addition & 2 deletions private/buf/cmd/buf/buf.go
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down

0 comments on commit 74ade48

Please sign in to comment.