Skip to content

Commit 26f3b22

Browse files
NoSugarCoffeeliangliang.dai
andauthored
Fix typo in comment (#340)
Co-authored-by: liangliang.dai <[email protected]>
1 parent ea91f66 commit 26f3b22

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

entity_repository_go1.18.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,14 @@ type EntityRepository[T any] interface {
2727
// Supported aggregate: count, sum, avg, max, min.
2828
// Any select, group, offset, limit and sort query will be ignored automatically.
2929
// If complex aggregation is needed, consider using All instead.
30-
// It'll panic if any error eccured.
30+
// It'll panic if any error occurred.
3131
MustAggregate(ctx context.Context, aggregate string, field string, queriers ...Querier) int
3232

3333
// Count entities that match the query.
3434
Count(ctx context.Context, queriers ...Querier) (int, error)
3535

3636
// MustCount entities that match the query.
37-
// It'll panic if any error eccured.
37+
// It'll panic if any error occurred.
3838
MustCount(ctx context.Context, queriers ...Querier) int
3939

4040
// Find a entity that match the query.
@@ -49,7 +49,7 @@ type EntityRepository[T any] interface {
4949
FindAll(ctx context.Context, queriers ...Querier) ([]T, error)
5050

5151
// MustFindAll entities that match the query.
52-
// It'll panic if any error eccured.
52+
// It'll panic if any error occurred.
5353
MustFindAll(ctx context.Context, queriers ...Querier) []T
5454

5555
// FindAndCountAll entities that match the query.
@@ -60,7 +60,7 @@ type EntityRepository[T any] interface {
6060
// MustFindAndCountAll entities that match the query.
6161
// This is a convenient method that combines FindAll and Count. It's useful when dealing with queries related to pagination.
6262
// Limit and Offset property will be ignored when performing count query.
63-
// It'll panic if any error eccured.
63+
// It'll panic if any error occurred.
6464
MustFindAndCountAll(ctx context.Context, queriers ...Querier) ([]T, int)
6565

6666
// Insert a entity to database.
@@ -91,7 +91,7 @@ type EntityRepository[T any] interface {
9191
Delete(ctx context.Context, entity *T, mutators ...Mutator) error
9292

9393
// MustDelete a entity.
94-
// It'll panic if any error eccured.
94+
// It'll panic if any error occurred.
9595
MustDelete(ctx context.Context, entity *T, mutators ...Mutator)
9696

9797
// DeleteAll entities.

repository.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,14 +34,14 @@ type Repository interface {
3434
// Supported aggregate: count, sum, avg, max, min.
3535
// Any select, group, offset, limit and sort query will be ignored automatically.
3636
// If complex aggregation is needed, consider using All instead.
37-
// It'll panic if any error eccured.
37+
// It'll panic if any error occurred.
3838
MustAggregate(ctx context.Context, query Query, aggregate string, field string) int
3939

4040
// Count entities that match the query.
4141
Count(ctx context.Context, collection string, queriers ...Querier) (int, error)
4242

4343
// MustCount entities that match the query.
44-
// It'll panic if any error eccured.
44+
// It'll panic if any error occurred.
4545
MustCount(ctx context.Context, collection string, queriers ...Querier) int
4646

4747
// Find a entity that match the query.
@@ -56,7 +56,7 @@ type Repository interface {
5656
FindAll(ctx context.Context, entities any, queriers ...Querier) error
5757

5858
// MustFindAll entities that match the query.
59-
// It'll panic if any error eccured.
59+
// It'll panic if any error occurred.
6060
MustFindAll(ctx context.Context, entities any, queriers ...Querier)
6161

6262
// FindAndCountAll entities that match the query.
@@ -67,7 +67,7 @@ type Repository interface {
6767
// MustFindAndCountAll entities that match the query.
6868
// This is a convenient method that combines FindAll and Count. It's useful when dealing with queries related to pagination.
6969
// Limit and Offset property will be ignored when performing count query.
70-
// It'll panic if any error eccured.
70+
// It'll panic if any error occurred.
7171
MustFindAndCountAll(ctx context.Context, entities any, queriers ...Querier) int
7272

7373
// Insert a entity to database.
@@ -107,7 +107,7 @@ type Repository interface {
107107
Delete(ctx context.Context, entity any, mutators ...Mutator) error
108108

109109
// MustDelete a entity.
110-
// It'll panic if any error eccured.
110+
// It'll panic if any error occurred.
111111
MustDelete(ctx context.Context, entity any, mutators ...Mutator)
112112

113113
// DeleteAll entities.
@@ -124,7 +124,7 @@ type Repository interface {
124124
DeleteAny(ctx context.Context, query Query) (int, error)
125125

126126
// MustDeleteAny entities that match the query.
127-
// It'll panic if any error eccured.
127+
// It'll panic if any error occurred.
128128
// Returns number of updated entities.
129129
MustDeleteAny(ctx context.Context, query Query) int
130130

@@ -135,7 +135,7 @@ type Repository interface {
135135
Preload(ctx context.Context, entities any, field string, queriers ...Querier) error
136136

137137
// MustPreload association with given query.
138-
// This function can accepts either a struct or a slice of structs.
138+
// This function can accept either a struct or a slice of structs.
139139
// It'll panic if any error occurred.
140140
MustPreload(ctx context.Context, entities any, field string, queriers ...Querier)
141141

0 commit comments

Comments
 (0)