Loading Go and MongoDB/First try/main.go +0 −5 Original line number Diff line number Diff line Loading @@ -58,7 +58,6 @@ func main() { // getAllPosts(ctx, true) // better for a larger dataset // getSinglePost(ctx, bson.M{"title": "Hello!"}) // note that this is a filter. // Because it is a filter, the parameters have to be exact. search(ctx, /*...*/) } func insertPost(ctx context.Context, newPost bson.D) { Loading Loading @@ -104,7 +103,3 @@ func getSinglePost(ctx context.Context, filter bson.M) { } fmt.Println(postsFiltered) } func search(ctx context.Context, searchObject bson.D) { } Loading
Go and MongoDB/First try/main.go +0 −5 Original line number Diff line number Diff line Loading @@ -58,7 +58,6 @@ func main() { // getAllPosts(ctx, true) // better for a larger dataset // getSinglePost(ctx, bson.M{"title": "Hello!"}) // note that this is a filter. // Because it is a filter, the parameters have to be exact. search(ctx, /*...*/) } func insertPost(ctx context.Context, newPost bson.D) { Loading Loading @@ -104,7 +103,3 @@ func getSinglePost(ctx context.Context, filter bson.M) { } fmt.Println(postsFiltered) } func search(ctx context.Context, searchObject bson.D) { }