Skip to content

Commit

Permalink
Fix modules flag type and docs (#2301)
Browse files Browse the repository at this point in the history
- Use `StringSliceVar` as other flags in the codebase.
- Improve flag documentation.
  • Loading branch information
unmultimedio authored Jul 17, 2023
1 parent 4ad371a commit 575bd3d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions private/buf/cmd/buf/command/alpha/repo/reposync/reposync.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,14 @@ func (f *flags) Bind(flagSet *pflag.FlagSet) {
),
)
// TODO: before we take this to beta, and as part of mult-module support, re-evaluate the UX of this flag
flagSet.StringArrayVar(
flagSet.StringSliceVar(
&f.Modules,
moduleFlagName,
nil,
"The module(s) to sync to the BSR; this must be in the format <module>:<module-identity>",
"The module(s) to sync to the BSR; this must be in the format <module-path>:<module-name>. "+
"The <module-path> is the directory relative to the git repository, and the <module-name> "+
"is the module's fully qualified name (FQN) as defined in "+
"https://buf.build/docs/bsr/module/manage/#how-modules-are-defined",
)
bufcli.BindCreateVisibility(flagSet, &f.CreateVisibility, createVisibilityFlagName, createFlagName)
flagSet.BoolVar(
Expand Down

0 comments on commit 575bd3d

Please sign in to comment.