File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff 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 }
You can’t perform that action at this time.
0 commit comments