mirror of
https://github.com/clearlinux/docker.git
synced 2026-09-04 20:51:44 +00:00
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
This commit is contained in:
+1
-1
@@ -30,7 +30,7 @@ import (
|
||||
|
||||
var (
|
||||
GITCOMMIT string
|
||||
VERSION string
|
||||
VERSION string
|
||||
)
|
||||
|
||||
func (cli *DockerCli) getMethod(name string) (reflect.Method, bool) {
|
||||
|
||||
@@ -152,7 +152,6 @@ func TestRunWorkdirExists(t *testing.T) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
func TestRunExit(t *testing.T) {
|
||||
stdin, stdinPipe := io.Pipe()
|
||||
stdout, stdoutPipe := io.Pipe()
|
||||
|
||||
+1
-1
@@ -16,7 +16,7 @@ import (
|
||||
|
||||
var (
|
||||
GITCOMMIT string
|
||||
VERSION string
|
||||
VERSION string
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
||||
+1
-2
@@ -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 == "" {
|
||||
|
||||
Reference in New Issue
Block a user