From 6302444f34b30e6c304cadfcc42f2bfd7d24fc66 Mon Sep 17 00:00:00 2001 From: Alexander Neumann Date: Sun, 23 Jul 2017 15:51:44 +0200 Subject: [PATCH] Remove linebreak from Errorf() format string --- run_integration_tests.go | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/run_integration_tests.go b/run_integration_tests.go index 0cee85805..0ee48f111 100644 --- a/run_integration_tests.go +++ b/run_integration_tests.go @@ -45,7 +45,7 @@ type TravisEnvironment struct { func (env *TravisEnvironment) getMinio() error { tempfile, err := os.Create(filepath.Join(os.Getenv("GOPATH"), "bin", "minio")) if err != nil { - return fmt.Errorf("create tempfile for minio download failed: %v\n", err) + return fmt.Errorf("create tempfile for minio download failed: %v", err) } url := fmt.Sprintf("https://dl.minio.io/server/minio/release/%s-%s/minio", @@ -53,23 +53,23 @@ func (env *TravisEnvironment) getMinio() error { msg("downloading %v\n", url) res, err := http.Get(url) if err != nil { - return fmt.Errorf("error downloading minio server: %v\n", err) + return fmt.Errorf("error downloading minio server: %v", err) } _, err = io.Copy(tempfile, res.Body) if err != nil { - return fmt.Errorf("error saving minio server to file: %v\n", err) + return fmt.Errorf("error saving minio server to file: %v", err) } err = res.Body.Close() if err != nil { - return fmt.Errorf("error closing HTTP download: %v\n", err) + return fmt.Errorf("error closing HTTP download: %v", err) } err = tempfile.Close() if err != nil { msg("closing tempfile failed: %v\n", err) - return fmt.Errorf("error closing minio server file: %v\n", err) + return fmt.Errorf("error closing minio server file: %v", err) } err = os.Chmod(tempfile.Name(), 0755) @@ -338,12 +338,12 @@ func findImports() (map[string][]string, error) { func runGofmt() error { dir, err := os.Getwd() if err != nil { - return fmt.Errorf("Getwd(): %v\n", err) + return fmt.Errorf("Getwd(): %v", err) } files, err := findGoFiles(dir) if err != nil { - return fmt.Errorf("error finding Go files: %v\n", err) + return fmt.Errorf("error finding Go files: %v", err) } msg("runGofmt() with %d files\n", len(files)) @@ -353,11 +353,11 @@ func runGofmt() error { buf, err := cmd.Output() if err != nil { - return fmt.Errorf("error running gofmt: %v\noutput: %s\n", err, buf) + return fmt.Errorf("error running gofmt: %v\noutput: %s", err, buf) } if len(buf) > 0 { - return fmt.Errorf("not formatted with `gofmt`:\n%s\n", buf) + return fmt.Errorf("not formatted with `gofmt`:\n%s", buf) } return nil @@ -369,7 +369,7 @@ func runGlyphcheck() error { buf, err := cmd.Output() if err != nil { - return fmt.Errorf("error running glyphcheck: %v\noutput: %s\n", err, buf) + return fmt.Errorf("error running glyphcheck: %v\noutput: %s", err, buf) } return nil