Skip to content

Commit

Permalink
fix: change condition to conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
lut777 committed Dec 29, 2022
1 parent c69685c commit 9ec4b1e
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pkg/ovs/ovs-vsctl.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,11 @@ func ovsAdd(table, record string, column string, values ...string) error {
}

// Returns the given column of records that match the condition
func ovsFind(table, column, condition string) ([]string, error) {
output, err := Exec("--no-heading", "--columns="+column, "find", table, condition)
func ovsFind(table, column string, conditions ...string) ([]string, error) {
args := make([]string, len(conditions)+4)
args[0], args[1], args[2], args[3] = "--no-heading", "--columns="+column, "find", table
copy(args[4:], conditions)
output, err := Exec(args...)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 9ec4b1e

Please sign in to comment.