mirror of https://github.com/docker/docs.git
Use API v1.11
Signed-off-by: Aanand Prasad <aanand.prasad@gmail.com> (github: aanand)
This commit is contained in:
parent
16036ec994
commit
36c58f3534
|
@ -23,7 +23,7 @@ func Forward() beam.Sender {
|
||||||
if len(ctx.Args) != 1 {
|
if len(ctx.Args) != 1 {
|
||||||
return fmt.Errorf("forward: spawn takes exactly 1 argument, got %d", len(ctx.Args))
|
return fmt.Errorf("forward: spawn takes exactly 1 argument, got %d", len(ctx.Args))
|
||||||
}
|
}
|
||||||
client, err := newClient(ctx.Args[0], "v0.10")
|
client, err := newClient(ctx.Args[0], "v1.11")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("%v", err)
|
return fmt.Errorf("%v", err)
|
||||||
}
|
}
|
||||||
|
@ -193,6 +193,7 @@ func newClient(peer, version string) (*client, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *client) call(method, path, body string) (*http.Response, error) {
|
func (c *client) call(method, path, body string) (*http.Response, error) {
|
||||||
|
path = fmt.Sprintf("/%s%s", c.version, path)
|
||||||
u, err := url.Parse(path)
|
u, err := url.Parse(path)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
@ -211,6 +212,7 @@ func (c *client) call(method, path, body string) (*http.Response, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *client) hijack(method, path string, in io.ReadCloser, stdout, stderr io.Writer) error {
|
func (c *client) hijack(method, path string, in io.ReadCloser, stdout, stderr io.Writer) error {
|
||||||
|
path = fmt.Sprintf("/%s%s", c.version, path)
|
||||||
dial, err := net.Dial("tcp", c.URL.Host)
|
dial, err := net.Dial("tcp", c.URL.Host)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
|
Loading…
Reference in New Issue