Skip to content

Commit 63279a5

Browse files
committed
fix: lint
1 parent 9494f11 commit 63279a5

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

main.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ func getComposeFiles(basePath string) ([]string, error) {
6161
return nil, err
6262
}
6363
if !isDir {
64-
return nil, fmt.Errorf("%s is not a Directory.", basePath)
64+
return nil, fmt.Errorf("%s is not a Directory", basePath)
6565
}
6666

6767
subdirs, err := getSubdirectories(basePath)
@@ -128,7 +128,7 @@ func getDockerServiceArray(dockerComposeYml string) ([]string, error) {
128128

129129
services, ok := rawData["services"].(map[string]interface{})
130130
if !ok {
131-
return nil, errors.New("rawData[\"services\"].(map[string]interface{}) is no ok!")
131+
return nil, errors.New("rawData[\"services\"].(map[string]interface{}) is no ok")
132132
}
133133

134134
for key := range services {
@@ -146,9 +146,10 @@ func runDockerExec(dockerComposeYml string, dockerService string) error {
146146

147147
dockerExecCommandParts := strings.Split(dockerExecCommand, " ")
148148
for i, part := range dockerExecCommandParts {
149-
if part == "%COMPOSE" {
149+
switch part {
150+
case "%COMPOSE":
150151
dockerExecCommandParts[i] = dockerComposeYml
151-
} else if part == "%SERVICE" {
152+
case "%SERVICE":
152153
dockerExecCommandParts[i] = dockerService
153154
}
154155
}

0 commit comments

Comments
 (0)