aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing/storer
diff options
context:
space:
mode:
authorMáximo Cuadros <mcuadros@gmail.com>2017-11-29 18:01:24 +0100
committerGitHub <noreply@github.com>2017-11-29 18:01:24 +0100
commit7ced03216a47327d64f68c750114a96cfcbae38b (patch)
treea797b79d0a750972ba9809eb52691cb09f9b6383 /plumbing/storer
parentc07c778ed043429427533e2fd7549a3d54b903f1 (diff)
parent18e6f9daa3899318d36b525b068837f49bc2c1cf (diff)
downloadgo-git-7ced03216a47327d64f68c750114a96cfcbae38b.tar.gz
Merge pull request #667 from ferhatelmas/simplify
all: simplification
Diffstat (limited to 'plumbing/storer')
-rw-r--r--plumbing/storer/reference_test.go24
1 files changed, 4 insertions, 20 deletions
diff --git a/plumbing/storer/reference_test.go b/plumbing/storer/reference_test.go
index 5738eef..490ec95 100644
--- a/plumbing/storer/reference_test.go
+++ b/plumbing/storer/reference_test.go
@@ -97,11 +97,7 @@ func (s *ReferenceSuite) TestReferenceFilteredIterNext(c *C) {
}
i := NewReferenceFilteredIter(func(r *plumbing.Reference) bool {
- if r.Name() == "bar" {
- return true
- }
-
- return false
+ return r.Name() == "bar"
}, NewReferenceSliceIter(slice))
foo, err := i.Next()
c.Assert(err, IsNil)
@@ -120,11 +116,7 @@ func (s *ReferenceSuite) TestReferenceFilteredIterForEach(c *C) {
}
i := NewReferenceFilteredIter(func(r *plumbing.Reference) bool {
- if r.Name() == "bar" {
- return true
- }
-
- return false
+ return r.Name() == "bar"
}, NewReferenceSliceIter(slice))
var count int
i.ForEach(func(r *plumbing.Reference) error {
@@ -143,11 +135,7 @@ func (s *ReferenceSuite) TestReferenceFilteredIterError(c *C) {
}
i := NewReferenceFilteredIter(func(r *plumbing.Reference) bool {
- if r.Name() == "bar" {
- return true
- }
-
- return false
+ return r.Name() == "bar"
}, NewReferenceSliceIter(slice))
var count int
exampleErr := errors.New("SOME ERROR")
@@ -172,11 +160,7 @@ func (s *ReferenceSuite) TestReferenceFilteredIterForEachStop(c *C) {
}
i := NewReferenceFilteredIter(func(r *plumbing.Reference) bool {
- if r.Name() == "bar" {
- return true
- }
-
- return false
+ return r.Name() == "bar"
}, NewReferenceSliceIter(slice))
var count int