You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi,
I am learning Golang, and I am reading through your repo. It is really helpful to read the code for learning, however, I see something that would make it difficult to change later on. let´s pretend I want to start a project using Postgres, and then I see this file:
Description
Hi,
I am learning Golang, and I am reading through your repo. It is really helpful to read the code for learning, however, I see something that would make it difficult to change later on. let´s pretend I want to start a project using Postgres, and then I see this file:
`package repositories
import (
"context"
"github.com/solrac97gr/go-jwt-auth/internal/user/domain/models"
)
func (repo *UserMongoDB) Save(user *models.User) error {
_, err := repo.collection.InsertOne(context.Background(), user)
if err != nil {
repo.logger.Error("Error saving user", err)
return err
}
return nil
}`
I am not sure how would I switch from mongoDB to Postgres easily.
thanks for your time.
Additional Information
No response
The text was updated successfully, but these errors were encountered: