Add RuleBuilderCommand.FlagForEachArg()
Add an analog to FlagForEachInput that takes non-path arguments. Test: rule_builder_test.go Change-Id: Ifdf5a16079018bfff9b06ce48b13b104a93fddd7
This commit is contained in:
@@ -117,6 +117,14 @@ func ExampleRuleBuilderCommand_FlagWithArg() {
|
||||
// ls --sort=time
|
||||
}
|
||||
|
||||
func ExampleRuleBuilderCommand_FlagForEachArg() {
|
||||
fmt.Println(NewRuleBuilder().Command().
|
||||
Tool("ls").
|
||||
FlagForEachArg("--sort=", []string{"time", "size"}))
|
||||
// Output:
|
||||
// ls --sort=time --sort=size
|
||||
}
|
||||
|
||||
func ExampleRuleBuilderCommand_FlagForEachInput() {
|
||||
fmt.Println(NewRuleBuilder().Command().
|
||||
Tool("turbine").
|
||||
|
Reference in New Issue
Block a user