api: client: lib: fix go vet
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
This commit is contained in:
parent
61a94411b5
commit
38f409d283
|
@ -70,7 +70,7 @@ func (cli *Client) postHijacked(path string, query url.Values, body interface{},
|
||||||
|
|
||||||
rwc, br := clientconn.Hijack()
|
rwc, br := clientconn.Hijack()
|
||||||
|
|
||||||
return types.HijackedResponse{rwc, br}, nil
|
return types.HijackedResponse{Conn: rwc, Reader: br}, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func tlsDial(network, addr string, config *tls.Config) (net.Conn, error) {
|
func tlsDial(network, addr string, config *tls.Config) (net.Conn, error) {
|
||||||
|
|
|
@ -29,7 +29,7 @@ func (cli *Client) NetworkRemove(networkID string) error {
|
||||||
|
|
||||||
// NetworkConnect connects a container to an existent network in the docker host.
|
// NetworkConnect connects a container to an existent network in the docker host.
|
||||||
func (cli *Client) NetworkConnect(networkID, containerID string) error {
|
func (cli *Client) NetworkConnect(networkID, containerID string) error {
|
||||||
nc := types.NetworkConnect{containerID}
|
nc := types.NetworkConnect{Container: containerID}
|
||||||
resp, err := cli.post("/networks/"+networkID+"/connect", nil, nc, nil)
|
resp, err := cli.post("/networks/"+networkID+"/connect", nil, nc, nil)
|
||||||
ensureReaderClosed(resp)
|
ensureReaderClosed(resp)
|
||||||
return err
|
return err
|
||||||
|
@ -37,7 +37,7 @@ func (cli *Client) NetworkConnect(networkID, containerID string) error {
|
||||||
|
|
||||||
// NetworkDisconnect disconnects a container from an existent network in the docker host.
|
// NetworkDisconnect disconnects a container from an existent network in the docker host.
|
||||||
func (cli *Client) NetworkDisconnect(networkID, containerID string) error {
|
func (cli *Client) NetworkDisconnect(networkID, containerID string) error {
|
||||||
nc := types.NetworkConnect{containerID}
|
nc := types.NetworkConnect{Container: containerID}
|
||||||
resp, err := cli.post("/networks/"+networkID+"/disconnect", nil, nc, nil)
|
resp, err := cli.post("/networks/"+networkID+"/disconnect", nil, nc, nil)
|
||||||
ensureReaderClosed(resp)
|
ensureReaderClosed(resp)
|
||||||
return err
|
return err
|
||||||
|
|
Loading…
Reference in New Issue