Fix merge issue

This commit is contained in:
Guillaume J. Charmes 2013-05-24 14:48:13 -07:00
parent ffd9e06deb
commit b438565609
2 changed files with 4 additions and 5 deletions

View file

@ -71,7 +71,7 @@ func (cli *DockerCli) CmdHelp(args ...string) error {
return nil return nil
} }
} }
help := fmt.Sprintf("Usage: docker [OPTIONS] COMMAND [arg...]\n -H=\"%s:%d\": Host:port to bind/connect to\n\nA self-sufficient runtime for linux containers.\n\nCommands:\n", cli.addr, cli.port) help := fmt.Sprintf("Usage: docker [OPTIONS] COMMAND [arg...]\n -H=\"%s:%d\": Host:port to bind/connect to\n\nA self-sufficient runtime for linux containers.\n\nCommands:\n", cli.host, cli.port)
for cmd, description := range map[string]string{ for cmd, description := range map[string]string{
"attach": "Attach to a running container", "attach": "Attach to a running container",
"build": "Build a container from Dockerfile or via stdin", "build": "Build a container from Dockerfile or via stdin",
@ -1201,7 +1201,7 @@ func (cli *DockerCli) call(method, path string, data interface{}) ([]byte, int,
params = bytes.NewBuffer(buf) params = bytes.NewBuffer(buf)
} }
req, err := http.NewRequest(method, fmt.Sprintf("http://%s:%d/v%g%s", cli.addr, cli.port, API_VERSION, path), params) req, err := http.NewRequest(method, fmt.Sprintf("http://%s:%d/v%g%s", cli.host, cli.port, API_VERSION, path), params)
if err != nil { if err != nil {
return nil, -1, err return nil, -1, err
} }
@ -1233,7 +1233,7 @@ func (cli *DockerCli) stream(method, path string, in io.Reader, out io.Writer) e
if (method == "POST" || method == "PUT") && in == nil { if (method == "POST" || method == "PUT") && in == nil {
in = bytes.NewReader([]byte{}) in = bytes.NewReader([]byte{})
} }
req, err := http.NewRequest(method, fmt.Sprintf("http://%s:%d/v%g%s", cli.addr, cli.port, API_VERSION, path), in) req, err := http.NewRequest(method, fmt.Sprintf("http://%s:%d/v%g%s", cli.host, cli.port, API_VERSION, path), in)
if err != nil { if err != nil {
return err return err
} }
@ -1269,7 +1269,7 @@ func (cli *DockerCli) hijack(method, path string, setRawTerminal bool) error {
return err return err
} }
req.Header.Set("Content-Type", "plain/text") req.Header.Set("Content-Type", "plain/text")
dial, err := net.Dial("tcp", fmt.Sprintf("%s:%d", cli.addr, cli.port)) dial, err := net.Dial("tcp", fmt.Sprintf("%s:%d", cli.host, cli.port))
if err != nil { if err != nil {
return err return err
} }

View file

@ -1,7 +1,6 @@
package term package term
import ( import (
"github.com/dotcloud/docker/utils"
"os" "os"
"os/signal" "os/signal"
"syscall" "syscall"