mirror of https://github.com/docker/docs.git
gofmt and test sub directories in makefile
This commit is contained in:
parent
0ae778c881
commit
5dcab2d361
2
Makefile
2
Makefile
|
@ -72,7 +72,7 @@ else ifneq ($(DOCKER_DIR), $(realpath $(DOCKER_DIR)))
|
||||||
endif
|
endif
|
||||||
|
|
||||||
test: all
|
test: all
|
||||||
@(cd $(DOCKER_DIR); sudo -E go test $(GO_OPTIONS))
|
@(cd $(DOCKER_DIR); sudo -E go test ./... $(GO_OPTIONS))
|
||||||
|
|
||||||
fmt:
|
fmt:
|
||||||
@gofmt -s -l -w .
|
@gofmt -s -l -w .
|
||||||
|
|
|
@ -82,7 +82,7 @@ func decodeAuth(authStr string) (*AuthConfig, error) {
|
||||||
func LoadConfig(rootPath string) (*AuthConfig, error) {
|
func LoadConfig(rootPath string) (*AuthConfig, error) {
|
||||||
confFile := path.Join(rootPath, CONFIGFILE)
|
confFile := path.Join(rootPath, CONFIGFILE)
|
||||||
if _, err := os.Stat(confFile); err != nil {
|
if _, err := os.Stat(confFile); err != nil {
|
||||||
return &AuthConfig{rootPath:rootPath}, ErrConfigFileMissing
|
return &AuthConfig{rootPath: rootPath}, ErrConfigFileMissing
|
||||||
}
|
}
|
||||||
b, err := ioutil.ReadFile(confFile)
|
b, err := ioutil.ReadFile(confFile)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in New Issue