error should be the last

This commit is contained in:
alessio 2016-08-21 20:29:19 +02:00
parent a383a693fd
commit 7f3ed8f2da
1 changed files with 2 additions and 2 deletions

View File

@ -112,14 +112,14 @@ func (p *Project) GoInstall() error {
return nil
}
func (p *Project) GoFmt() (error, io.Writer) {
func (p *Project) GoFmt() (io.Writer, error) {
var out bytes.Buffer
build := exec.Command("gofmt", "-s", "-w", "-e", ".")
build.Dir = p.base
build.Stdout = &out
build.Stderr = &out
if err := build.Run(); err != nil {
return err, build.Stderr
return build.Stderr, err
}
return nil, nil
}