Browse code

gofmt and test sub directories in makefile

Victor Vieux authored on 2013/06/19 23:50:58
Showing 4 changed files
... ...
@@ -72,7 +72,7 @@ else ifneq ($(DOCKER_DIR), $(realpath $(DOCKER_DIR)))
72 72
 endif
73 73
 
74 74
 test: all
75
-	@(cd $(DOCKER_DIR); sudo -E go test $(GO_OPTIONS))
75
+	@(cd $(DOCKER_DIR); sudo -E go test ./... $(GO_OPTIONS))
76 76
 
77 77
 fmt:
78 78
 	@gofmt -s -l -w .
... ...
@@ -82,7 +82,7 @@ func decodeAuth(authStr string) (*AuthConfig, error) {
82 82
 func LoadConfig(rootPath string) (*AuthConfig, error) {
83 83
 	confFile := path.Join(rootPath, CONFIGFILE)
84 84
 	if _, err := os.Stat(confFile); err != nil {
85
-		return &AuthConfig{rootPath:rootPath}, ErrConfigFileMissing
85
+		return &AuthConfig{rootPath: rootPath}, ErrConfigFileMissing
86 86
 	}
87 87
 	b, err := ioutil.ReadFile(confFile)
88 88
 	if err != nil {
... ...
@@ -481,7 +481,7 @@ type Registry struct {
481 481
 func NewRegistry(root string, authConfig *auth.AuthConfig) *Registry {
482 482
 	httpTransport := &http.Transport{
483 483
 		DisableKeepAlives: true,
484
-		Proxy: http.ProxyFromEnvironment,
484
+		Proxy:             http.ProxyFromEnvironment,
485 485
 	}
486 486
 
487 487
 	r := &Registry{
... ...
@@ -9,16 +9,16 @@ const (
9 9
 	getTermios = syscall.TIOCGETA
10 10
 	setTermios = syscall.TIOCSETA
11 11
 
12
-	ECHO    = 0x00000008
13
-	ONLCR   = 0x2
14
-	ISTRIP  = 0x20
15
-	INLCR   = 0x40
16
-	ISIG    = 0x80
17
-	IGNCR   = 0x80
18
-	ICANON  = 0x100
19
-	ICRNL   = 0x100
20
-	IXOFF   = 0x400
21
-	IXON    = 0x200
12
+	ECHO   = 0x00000008
13
+	ONLCR  = 0x2
14
+	ISTRIP = 0x20
15
+	INLCR  = 0x40
16
+	ISIG   = 0x80
17
+	IGNCR  = 0x80
18
+	ICANON = 0x100
19
+	ICRNL  = 0x100
20
+	IXOFF  = 0x400
21
+	IXON   = 0x200
22 22
 )
23 23
 
24 24
 type Termios struct {