Add RuleBuilderCommand.Flags
Test: rule_builder_test.go Change-Id: I7887a67aaef33bc591d83fade9175da3e401529f
This commit is contained in:
@@ -171,6 +171,14 @@ func ExampleRuleBuilderCommand_Flag() {
|
||||
// ls -l
|
||||
}
|
||||
|
||||
func ExampleRuleBuilderCommand_Flags() {
|
||||
ctx := pathContext()
|
||||
fmt.Println(NewRuleBuilder().Command().
|
||||
Tool(PathForSource(ctx, "ls")).Flags([]string{"-l", "-a"}))
|
||||
// Output:
|
||||
// ls -l -a
|
||||
}
|
||||
|
||||
func ExampleRuleBuilderCommand_FlagWithArg() {
|
||||
ctx := pathContext()
|
||||
fmt.Println(NewRuleBuilder().Command().
|
||||
|
Reference in New Issue
Block a user