Skip to content

Commit

Permalink
fix collection
Browse files Browse the repository at this point in the history
  • Loading branch information
phuong committed Sep 11, 2022
1 parent 1b181df commit 21615e5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mocom/collection.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"go.mongodb.org/mongo-driver/mongo/options"
)

func CreateCollection[T Model](ctx context.Context, opts options.CreateCollectionOptions) error {
func CreateCollection[T Model](ctx context.Context, opts ...*options.CreateCollectionOptions) error {
var t T
return db.CreateCollection(ctx, t.CollName())
return db.CreateCollection(ctx, t.CollName(), opts...)
}

0 comments on commit 21615e5

Please sign in to comment.