done check log

This commit is contained in:
Nam Huynh 2021-10-07 23:40:34 +07:00
parent a095bb9f08
commit 110127e76a
1 changed files with 0 additions and 3 deletions

View File

@ -13,7 +13,6 @@ import (
// CreateIndex ...
func CreateIndex(colName string, ind mongo.IndexModel) {
fmt.Println("db name:", db.Name())
// Get collection
col := db.Collection(colName)
if col == nil {
@ -21,8 +20,6 @@ func CreateIndex(colName string, ind mongo.IndexModel) {
return
}
fmt.Println("ind", ind)
opts := options.CreateIndexes().SetMaxTime(time.Minute * 10)
_, err := col.Indexes().CreateOne(context.Background(), ind, opts)
if err != nil {