Merge pull request #122 from cfmobile/master
Run go fmt on all files
diff --git a/format/format_test.go b/format/format_test.go
index fd926f5..59517fe 100644
--- a/format/format_test.go
+++ b/format/format_test.go
@@ -2,11 +2,11 @@
import (
"fmt"
- "strings"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
. "github.com/onsi/gomega/format"
"github.com/onsi/gomega/types"
+ "strings"
)
//recursive struct
diff --git a/gbytes/say_matcher_test.go b/gbytes/say_matcher_test.go
index d0ddf1f..63fb3b3 100644
--- a/gbytes/say_matcher_test.go
+++ b/gbytes/say_matcher_test.go
@@ -1,8 +1,8 @@
package gbytes_test
import (
- "time"
. "github.com/onsi/gomega/gbytes"
+ "time"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
diff --git a/gexec/exit_matcher_test.go b/gexec/exit_matcher_test.go
index 9f18e2d..79615dd 100644
--- a/gexec/exit_matcher_test.go
+++ b/gexec/exit_matcher_test.go
@@ -1,9 +1,9 @@
package gexec_test
import (
+ . "github.com/onsi/gomega/gexec"
"os/exec"
"time"
- . "github.com/onsi/gomega/gexec"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
diff --git a/matchers/be_sent_matcher_test.go b/matchers/be_sent_matcher_test.go
index 381c2b4..205d71f 100644
--- a/matchers/be_sent_matcher_test.go
+++ b/matchers/be_sent_matcher_test.go
@@ -1,8 +1,8 @@
package matchers_test
import (
- "time"
. "github.com/onsi/gomega/matchers"
+ "time"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
diff --git a/matchers/consist_of_test.go b/matchers/consist_of_test.go
index 0b230e3..dcd1afe 100644
--- a/matchers/consist_of_test.go
+++ b/matchers/consist_of_test.go
@@ -54,10 +54,10 @@
Ω([]string{"foo", "bar", "baz"}).ShouldNot(ConsistOf("foo", MatchRegexp("^ba"), MatchRegexp("turducken")))
})
- It("should not depend on the order of the matchers", func() {
+ It("should not depend on the order of the matchers", func() {
Ω([][]int{[]int{1, 2}, []int{2}}).Should(ConsistOf(ContainElement(1), ContainElement(2)))
Ω([][]int{[]int{1, 2}, []int{2}}).Should(ConsistOf(ContainElement(2), ContainElement(1)))
- })
+ })
Context("when a matcher errors", func() {
It("should soldier on", func() {
diff --git a/matchers/have_suffix_matcher.go b/matchers/have_suffix_matcher.go
index eb1b284..afc78fc 100644
--- a/matchers/have_suffix_matcher.go
+++ b/matchers/have_suffix_matcher.go
@@ -16,7 +16,7 @@
return false, fmt.Errorf("HaveSuffix matcher requires a string or stringer. Got:\n%s", format.Object(actual, 1))
}
suffix := matcher.suffix()
- return len(actualString) >= len(suffix) && actualString[len(actualString) - len(suffix):] == suffix, nil
+ return len(actualString) >= len(suffix) && actualString[len(actualString)-len(suffix):] == suffix, nil
}
func (matcher *HaveSuffixMatcher) suffix() string {
diff --git a/matchers/support/goraph/util/util.go b/matchers/support/goraph/util/util.go
index a24cd27..d76a1ee 100644
--- a/matchers/support/goraph/util/util.go
+++ b/matchers/support/goraph/util/util.go
@@ -3,5 +3,5 @@
import "math"
func Odd(n int) bool {
- return math.Mod(float64(n), 2.0) == 1.0
-}
+ return math.Mod(float64(n), 2.0) == 1.0
+}