Skip to content

Commit f09a0a8

Browse files
authored
Merge pull request #88 from pankona/remove-unnecessary-type-specifying
Remove unnecessary type descriptions
2 parents 6941216 + e5debc3 commit f09a0a8

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

dataloader_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -694,7 +694,7 @@ func batchIdentity[K comparable](_ context.Context, keys []K) (results []*Result
694694
var _ctx = context.Background()
695695

696696
func BenchmarkLoader(b *testing.B) {
697-
UserLoader := NewBatchedLoader[string, string](batchIdentity[string])
697+
UserLoader := NewBatchedLoader(batchIdentity[string])
698698
b.ResetTimer()
699699
for i := 0; i < b.N; i++ {
700700
UserLoader.Load(_ctx, (strconv.Itoa(i)))

example/lru_cache/golang_lru_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ func ExampleGolangLRU() {
5252
}
5353

5454
m := map[int]*User{
55-
5: &User{ID: 5, FirstName: "John", LastName: "Smith", Email: "[email protected]"},
55+
5: {ID: 5, FirstName: "John", LastName: "Smith", Email: "[email protected]"},
5656
}
5757

5858
batchFunc := func(_ context.Context, keys []int) []*dataloader.Result[*User] {

example/no_cache/no_cache_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ func ExampleNoCache() {
1616
}
1717

1818
m := map[int]*User{
19-
5: &User{ID: 5, FirstName: "John", LastName: "Smith", Email: "[email protected]"},
19+
5: {ID: 5, FirstName: "John", LastName: "Smith", Email: "[email protected]"},
2020
}
2121

2222
batchFunc := func(_ context.Context, keys []int) []*dataloader.Result[*User] {

example/ttl_cache/go_cache_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ func ExampleTTLCache() {
5656
}
5757

5858
m := map[int]*User{
59-
5: &User{ID: 5, FirstName: "John", LastName: "Smith", Email: "[email protected]"},
59+
5: {ID: 5, FirstName: "John", LastName: "Smith", Email: "[email protected]"},
6060
}
6161

6262
batchFunc := func(_ context.Context, keys []int) []*dataloader.Result[*User] {

0 commit comments

Comments
 (0)