dotcloud/docker — pull request #6311 by michaelmaltese (2014-06-09 19:14:51+00:00)
Title: Use build flags for daemon CLI code

Fixes #6256 by separating the daemon CLI code for Linux and non-Linux systems (just complains and bails on non-Linux). The file `docker/docker.go` was importing some packages that end up importing a Cgo file that includes a Linux-only header, so I moved the section that needs those packages into `docker/docker_linux.go`, and added dummy functions to `docker/docker_nonlinux.go`. I also lifted the command-line flags to global variables in the `main` package so that they could be accessed by the functions inside `docker_linux.go`.

See also #6309 for another approach.