Skip to content

Commit 9d4c0b3

Browse files
author
hwchiu
committed
combime the ip:port to single parameter and fix the comment
1 parent 37a69d5 commit 9d4c0b3

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

ovs/client.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -318,10 +318,10 @@ func SetSSLParam(pkey string, cert string, cacert string) OptionFunc {
318318
}
319319

320320
// SetTCPParam configures the OVSDB connection using a TCP format ip:port
321-
// for use with all ovs commands
322-
func SetTCPParam(ip string, port string) OptionFunc {
321+
// for use with all ovs-vsctl commands.
322+
func SetTCPParam(addr string) OptionFunc {
323323
return func(c *Client) {
324-
c.flags= append(c.ofctlFlags, fmt.Sprintf("--db=tcp:%s:%s", ip, port))
324+
c.flags= append(c.flags, fmt.Sprintf("--db=tcp:%s", addr))
325325
}
326326
}
327327

ovs/client_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,9 +102,9 @@ func TestNew(t *testing.T) {
102102
},
103103
},
104104
{
105-
desc: "SetTCPParam(ip, port)",
105+
desc: "SetTCPParam(addr)",
106106
options: []OptionFunc{
107-
SetTCPParam("127.0.0.1", "6640"),
107+
SetTCPParam("127.0.0.1:6640"),
108108
},
109109
c: &Client{
110110
flags: []string{"--db=tcp:127.0.0.1:6640"},

0 commit comments

Comments
 (0)