go fmt
This commit is contained in:
parent
88847aed71
commit
3c4c5a15b4
|
@ -4,8 +4,8 @@ import (
|
|||
"bytes"
|
||||
"errors"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
||||
|
|
|
@ -22,11 +22,11 @@ func TestNewWorkflow(t *testing.T) {
|
|||
runcount := 0
|
||||
successWorkflow := NewPipelineExecutor(
|
||||
func() error {
|
||||
runcount ++
|
||||
runcount++
|
||||
return nil
|
||||
},
|
||||
func() error {
|
||||
runcount ++
|
||||
runcount++
|
||||
return nil
|
||||
})
|
||||
assert.Nil(successWorkflow())
|
||||
|
|
|
@ -32,7 +32,7 @@ type dockerMessage struct {
|
|||
func (i *DockerExecutorInput) logDockerOutput(dockerResponse io.Reader) {
|
||||
scanner := bufio.NewScanner(dockerResponse)
|
||||
if i.Logger == nil {
|
||||
return
|
||||
return
|
||||
}
|
||||
for scanner.Scan() {
|
||||
i.Logger.Infof(scanner.Text())
|
||||
|
@ -66,7 +66,7 @@ func (i *DockerExecutorInput) writeLog(isError bool, format string, args ...inte
|
|||
|
||||
func (i *DockerExecutorInput) logDockerResponse(dockerResponse io.ReadCloser, isError bool) {
|
||||
if dockerResponse == nil {
|
||||
return
|
||||
return
|
||||
}
|
||||
defer dockerResponse.Close()
|
||||
|
||||
|
@ -83,7 +83,7 @@ func (i *DockerExecutorInput) logDockerResponse(dockerResponse io.ReadCloser, is
|
|||
if err := json.Unmarshal(line, &msg); err == nil {
|
||||
if msg.Error != "" {
|
||||
i.writeLog(isError, "%s", msg.Error)
|
||||
return
|
||||
return
|
||||
}
|
||||
|
||||
if msg.Status != "" {
|
||||
|
|
Loading…
Reference in New Issue