container: fix docstring typo
testing: removeImage should remove tag from map
testing/server: added DefaultHandler method to server
Merge pull request #121 from proppy/patch-2

container: fix docstring typo
authors: add Johan Euphrosine
testing/server: ListImages should return image tags
testing/server: use .RepoTags instead of .Tag according to docker docs
README coloring
Merge pull request #122 from fgrehm/patch-1

README coloring
authors: add Fabio Rehm
client: exit hijack when the output goroutine exits

The previous approach would wait for the input goroutine to exit as
well. This would let to the problem described in the issue #117.

Fixes #117.
client: add function NewClientFromConn

This is a huge commit because of the giant refactor and change in the
behaviour here: now the client will always dial to the remote server and
invoke httputil.ClientConn.Do. When the NewClientFromConn is called, the
dial step is skipped. This had a huge impact in the tests, because now
we need an actual HTTP server, so we can dial to it.

I've also fixed the error handling of httputil.ErrPersistEOF. This error
means that the client should not send another request, but the current
request has been successfully processed by the server.

Closes #123.
client: remove deadcode
utils: remove deadcode
Revert "client: add function NewClientFromConn"

Not the right fix for App Engine.

Related to #123.

This reverts commit bae74f4815e617b7dab8db4867a6e83e561c167b.
client: export http.DefaultClient

We still need httputil.ClientConn for unix sockets connections, and
hijack is not using the provided HTTP client yet.

Related to #123.
client: do not close the errors channel on hijack

This may lead to a data race between the stdin and the main goroutines.
There's no need for closing the channel, since we always send the error
in it, even when the error is nil.

Detected via tsuru's race CI:

==================
WARNING: DATA RACE
Write by goroutine 56:
  runtime.closechan()
      /var/lib/jenkins/go/src/pkg/runtime/chan.goc:1027 +0x0
  github.com/fsouza/go-dockerclient.(*Client).hijack()
      /tmp/gopath/tsuru/src/github.com/fsouza/go-dockerclient/client.go:445 +0x864
  github.com/fsouza/go-dockerclient.(*Client).AttachToContainer()
      /tmp/gopath/tsuru/src/github.com/fsouza/go-dockerclient/container.go:561 +0x264
  github.com/tsuru/docker-cluster/cluster.(*Cluster).AttachToContainer()
      /tmp/gopath/tsuru/src/github.com/tsuru/docker-cluster/cluster/container.go:213 +0xe9
  github.com/tsuru/tsuru/provision/docker.(*container).logs()
      /tmp/gopath/tsuru/src/github.com/tsuru/tsuru/provision/docker/docker.go:557 +0x1c4
  github.com/tsuru/tsuru/provision/docker.func·020()
      /tmp/gopath/tsuru/src/github.com/tsuru/tsuru/provision/docker/actions.go:227 +0x2d9
  github.com/tsuru/tsuru/action.(*Pipeline).Execute()
      /tmp/gopath/tsuru/src/github.com/tsuru/tsuru/action/action.go:133 +0x745
  github.com/tsuru/tsuru/provision/docker.deploy()
      /tmp/gopath/tsuru/src/github.com/tsuru/tsuru/provision/docker/docker.go:294 +0x327
  github.com/tsuru/tsuru/provision/docker.archiveDeploy()
      /tmp/gopath/tsuru/src/github.com/tsuru/tsuru/provision/docker/docker.go:275 +0x162
  github.com/tsuru/tsuru/provision/docker.(*S).TestArchiveDeploy()
      /tmp/gopath/tsuru/src/github.com/tsuru/tsuru/provision/docker/docker_test.go:702 +0x31f
  runtime.call16()
      /var/lib/jenkins/go/src/pkg/runtime/asm_amd64.s:360 +0x31
  reflect.Value.Call()
      /var/lib/jenkins/go/src/pkg/reflect/value.go:411 +0xed
  launchpad.net/gocheck.func·006()
      /tmp/gopath/tsuru/src/launchpad.net/gocheck/gocheck.go:733 +0x51b
  launchpad.net/gocheck.func·004()
      /tmp/gopath/tsuru/src/launchpad.net/gocheck/gocheck.go:628 +0xf4

Previous read by goroutine 66:
  chansend()
      /var/lib/jenkins/go/src/pkg/runtime/chan.goc:75 +0x0
  github.com/fsouza/go-dockerclient.func·002()
      /tmp/gopath/tsuru/src/github.com/fsouza/go-dockerclient/client.go:442 +0x174

Goroutine 56 (running) created at:
  launchpad.net/gocheck.(*suiteRunner).forkCall()
      /tmp/gopath/tsuru/src/launchpad.net/gocheck/gocheck.go:629 +0x42e
  launchpad.net/gocheck.(*suiteRunner).forkTest()
      /tmp/gopath/tsuru/src/launchpad.net/gocheck/gocheck.go:765 +0xce
  launchpad.net/gocheck.(*suiteRunner).runTest()
      /tmp/gopath/tsuru/src/launchpad.net/gocheck/gocheck.go:770 +0x3e
  launchpad.net/gocheck.(*suiteRunner).run()
      /tmp/gopath/tsuru/src/launchpad.net/gocheck/gocheck.go:584 +0x3fd
  launchpad.net/gocheck.Run()
      /tmp/gopath/tsuru/src/launchpad.net/gocheck/run.go:76 +0x56
  launchpad.net/gocheck.RunAll()
      /tmp/gopath/tsuru/src/launchpad.net/gocheck/run.go:68 +0x12d
  launchpad.net/gocheck.TestingT()
      /tmp/gopath/tsuru/src/launchpad.net/gocheck/run.go:56 +0x53c
  github.com/tsuru/tsuru/provision/docker.Test()
      /tmp/gopath/tsuru/src/github.com/tsuru/tsuru/provision/docker/suite_test.go:22 +0x34
  testing.tRunner()
      /var/lib/jenkins/go/src/pkg/testing/testing.go:422 +0x10f

Goroutine 66 (finished) created at:
  github.com/fsouza/go-dockerclient.(*Client).hijack()
      /tmp/gopath/tsuru/src/github.com/fsouza/go-dockerclient/client.go:443 +0x807
  github.com/fsouza/go-dockerclient.(*Client).AttachToContainer()
      /tmp/gopath/tsuru/src/github.com/fsouza/go-dockerclient/container.go:561 +0x264
  github.com/tsuru/docker-cluster/cluster.(*Cluster).AttachToContainer()
      /tmp/gopath/tsuru/src/github.com/tsuru/docker-cluster/cluster/container.go:213 +0xe9
  github.com/tsuru/tsuru/provision/docker.(*container).logs()
      /tmp/gopath/tsuru/src/github.com/tsuru/tsuru/provision/docker/docker.go:557 +0x1c4
  github.com/tsuru/tsuru/provision/docker.func·020()
      /tmp/gopath/tsuru/src/github.com/tsuru/tsuru/provision/docker/actions.go:227 +0x2d9
  github.com/tsuru/tsuru/action.(*Pipeline).Execute()
      /tmp/gopath/tsuru/src/github.com/tsuru/tsuru/action/action.go:133 +0x745
  github.com/tsuru/tsuru/provision/docker.deploy()
      /tmp/gopath/tsuru/src/github.com/tsuru/tsuru/provision/docker/docker.go:294 +0x327
  github.com/tsuru/tsuru/provision/docker.archiveDeploy()
      /tmp/gopath/tsuru/src/github.com/tsuru/tsuru/provision/docker/docker.go:275 +0x162
  github.com/tsuru/tsuru/provision/docker.(*S).TestArchiveDeploy()
      /tmp/gopath/tsuru/src/github.com/tsuru/tsuru/provision/docker/docker_test.go:702 +0x31f
  runtime.call16()
      /var/lib/jenkins/go/src/pkg/runtime/asm_amd64.s:360 +0x31
  reflect.Value.Call()
      /var/lib/jenkins/go/src/pkg/reflect/value.go:411 +0xed
  launchpad.net/gocheck.func·006()
      /tmp/gopath/tsuru/src/launchpad.net/gocheck/gocheck.go:733 +0x51b
  launchpad.net/gocheck.func·004()
      /tmp/gopath/tsuru/src/launchpad.net/gocheck/gocheck.go:628 +0xf4
==================
utils: appengine compatibility
utils: move the build tags below the © banner
Merge pull request #127 from kidoman/appengine_compat

utils: appengine compatibility