diff options
author | Bjørn Erik Pedersen <[email protected]> | 2020-12-02 13:23:25 +0100 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2020-12-03 13:12:58 +0100 |
commit | d90e37e0c6e812f9913bf256c9c81aa05b7a08aa (patch) | |
tree | 7b1b14464eefec1188ca2eed53c64e4823453cc9 /identity | |
parent | 32471b57bde51c55a15dbf1db75d6e5f7232c347 (diff) | |
download | hugo-d90e37e0c6e812f9913bf256c9c81aa05b7a08aa.tar.gz hugo-d90e37e0c6e812f9913bf256c9c81aa05b7a08aa.zip |
all: Format code with gofumpt
See https://github.com/mvdan/gofumpt
Diffstat (limited to 'identity')
-rw-r--r-- | identity/identity.go | 1 | ||||
-rw-r--r-- | identity/identity_test.go | 4 |
2 files changed, 0 insertions, 5 deletions
diff --git a/identity/identity.go b/identity/identity.go index b002f34f0..052740675 100644 --- a/identity/identity.go +++ b/identity/identity.go @@ -26,7 +26,6 @@ func NewPathIdentity(typ, pat string) PathIdentity { type Identities map[Identity]Provider func (ids Identities) search(depth int, id Identity) Provider { - if v, found := ids[id.GetIdentity()]; found { return v } diff --git a/identity/identity_test.go b/identity/identity_test.go index c315df1e7..baf2628bb 100644 --- a/identity/identity_test.go +++ b/identity/identity_test.go @@ -33,14 +33,12 @@ func TestIdentityManager(t *testing.T) { } func BenchmarkIdentityManager(b *testing.B) { - createIds := func(num int) []Identity { ids := make([]Identity, num) for i := 0; i < num; i++ { ids[i] = testIdentity{name: fmt.Sprintf("id%d", i)} } return ids - } b.Run("Add", func(b *testing.B) { @@ -75,9 +73,7 @@ func BenchmarkIdentityManager(b *testing.B) { id := im.Search(testIdentity{name: name}) c.Assert(id.GetIdentity().Name(), qt.Equals, name) } - }) - } type testIdentity struct { |