Skip to content

Commit

Permalink
doc: fix comment
Browse files Browse the repository at this point in the history
  • Loading branch information
taako-502 committed Feb 11, 2024
1 parent b649b3c commit fc7ab86
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ func init() {
if err != nil {
return err
}

return nil
}, func(db *mongo.Database) error {
_, err := db.Collection("my-coll").Indexes().DropOne(context.TODO(), "my-index")
Expand Down
6 changes: 3 additions & 3 deletions global_migrate.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@ func internalRegister(up, down MigrationFunc, skip int) error {
// "go.mongodb.org/mongo-driver/bson"
// "go.mongodb.org/mongo-driver/mongo"
// "go.mongodb.org/mongo-driver/mongo/options"
// "github.com/xakep666/mongo-migrate"
// migrate "github.com/xakep666/mongo-migrate"
// )
//
// func init() {
// Register(func(db *mongo.Database) error {
// migrate.Register(func(db *mongo.Database) error {
// opt := options.Index().SetName("my-index")
// keys := bson.D{{"my-key", 1}}
// keys := bson.D{{Key: "my-key", Value: 1}}
// model := mongo.IndexModel{Keys: keys, Options: opt}
// _, err := db.Collection("my-coll").Indexes().CreateOne(context.TODO(), model)
// if err != nil {
Expand Down

0 comments on commit fc7ab86

Please sign in to comment.