Skip to content

Commit

Permalink
WIP: Minor bug fix in rdbms.go
Browse files Browse the repository at this point in the history
  • Loading branch information
shashank-priyadarshi committed Feb 17, 2024
1 parent c5fa5a3 commit 02cf32e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion database/internal/connections/mongodb.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
_ "go.mongodb.org/mongo-driver/mongo/options"
)

var opts *options.ClientOptions
var opts = &options.ClientOptions{}

func NewMongoDBClient(ctx context.Context, log ports.Logger, config *models.Config) (client *mongo.Client, err error) {

Expand Down
10 changes: 5 additions & 5 deletions database/internal/mongodb/mongodb.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ type Handle struct {
client *mongo.Client
}

func NewMongoDBHandle(log ports.Logger, client *mongo.Client) (handle *Handle) {
handle.log = log
handle.client = client

return
func NewMongoDBHandle(log ports.Logger, client *mongo.Client) *Handle {
return &Handle{
log: log,
client: client,
}
}

func (h *Handle) Create(ctx context.Context, params ...interface{}) (response models.Response, err error) {
Expand Down

0 comments on commit 02cf32e

Please sign in to comment.