From d80b50d4b4759665b93e713b99239aba9893416e Mon Sep 17 00:00:00 2001 From: jbbarth Date: Mon, 26 Aug 2013 17:45:52 +0200 Subject: [PATCH] Improve formatting with 'go fmt' as stated in CONTRIBUTING.md As 'go fmt' doesn't support verifying files in multiple directories, it's probably a good idea to run it on all '*.go' files from time to time with something like this: find . -name "*.go" | xargs dirname | sort -u | xargs -n 1 echo go fmt --- commands.go | 2 +- commands_test.go | 1 - docker/docker.go | 2 +- sysinit.go | 3 +-- 4 files changed, 3 insertions(+), 5 deletions(-) diff --git a/commands.go b/commands.go index 236fb65d10..41e20158b8 100644 --- a/commands.go +++ b/commands.go @@ -30,7 +30,7 @@ import ( var ( GITCOMMIT string - VERSION string + VERSION string ) func (cli *DockerCli) getMethod(name string) (reflect.Method, bool) { diff --git a/commands_test.go b/commands_test.go index 25e4804361..2946da8792 100644 --- a/commands_test.go +++ b/commands_test.go @@ -152,7 +152,6 @@ func TestRunWorkdirExists(t *testing.T) { } - func TestRunExit(t *testing.T) { stdin, stdinPipe := io.Pipe() stdout, stdoutPipe := io.Pipe() diff --git a/docker/docker.go b/docker/docker.go index 6ac0c9379d..9bbd40b696 100644 --- a/docker/docker.go +++ b/docker/docker.go @@ -16,7 +16,7 @@ import ( var ( GITCOMMIT string - VERSION string + VERSION string ) func main() { diff --git a/sysinit.go b/sysinit.go index aa5d2b2a17..34f1cbdac6 100644 --- a/sysinit.go +++ b/sysinit.go @@ -27,10 +27,9 @@ func setupWorkingDirectory(workdir string) { if workdir == "" { return } - syscall.Chdir(workdir) + syscall.Chdir(workdir) } - // Takes care of dropping privileges to the desired user func changeUser(u string) { if u == "" {