You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: README.md
+3
Original file line number
Diff line number
Diff line change
@@ -42,6 +42,9 @@ Add `./vendor/` to package path if the dependency is vendored; when using Go mod
42
42
43
43
Set the `circuit-major-version` flag if using Go modules and major version 3 or later. This makes the wrappers import the same version as the rest of your code.
44
44
45
+
Note you can also pass multiple --name, or multiple names separated by comma in order to generate multiple interfaces at once. Note that while doing this
46
+
the --out parameter has to be a directory and you cannot use an alias.
47
+
45
48
## Example
46
49
47
50
Generating the DynamoDB client into the wrappers directory with circuits aliased as "DynamoDB"
pf.StringVar(&c.pkg, "pkg", "", "(Required) The path to the package. Add ./vendor if the dependency is vendored")
221
221
markFlagRequired(pf, "pkg")
222
222
223
-
pf.StringVar(&c.name, "name", "", "(Required) The name of the type (interface or struct) in the package path")
223
+
pf.StringSliceVar(&c.name, "name", []string{}, "(Required) The name of the type (interface or struct) in the package path")
224
224
markFlagRequired(pf, "name")
225
225
226
-
pf.StringVar(&c.out, "out", "", "(Required) The output path. A default filename is given if the path looks like a directory. The path is lazily created (equivalent to mkdir -p)")
226
+
pf.StringVar(&c.out, "out", "", "(Required) The output path. A default filename is given if the path looks like a directory. The path is lazily created (equivalent to mkdir -p). Must be a directory of passing multiple names")
227
227
markFlagRequired(pf, "out")
228
228
229
229
pf.StringVar(&c.alias, "alias", "", "(Optional) The name used for the generated wrapper in the struct, constructor, and default circuit prefix. Defaults to name")
@@ -243,12 +243,15 @@ func markFlagRequired(pf *pflag.FlagSet, name string) {
0 commit comments