Skip to content

Commit

Permalink
[.] fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
ganinw13120 committed Jan 12, 2024
1 parent 353146b commit 77f791e
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions mongo.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@ package xk6_mongo
import (
"context"
"fmt"
"github.com/ganinw13120/xk6-mongo/database"
"github.com/ganinw13120/xk6-mongo/mongo"
k6modules "go.k6.io/k6/js/modules"
"go.mongodb.org/mongo-driver/bson"
)

func init() {
Expand All @@ -15,24 +13,6 @@ func init() {

type Mongo struct{}

func main() {
client, err := database.NewMongoDBConnection(context.TODO(), "mongodb+srv://spider-data-history:wYxoSKhlt6Np7060@spider-dev.673kr.mongodb.net/")
if err != nil {
panic(err)
}
db := database.NewMongoDB(client)
fmt.Println("Connected")
col := client.Database("history").Collection("history-account")
var result interface{}

err = db.FindOne(context.TODO(), col, &result, bson.E{"id", ""})
fmt.Println(result)
fmt.Println(err)
//as := Mongo{}
//as.NewClient("mongodb://gan:lHxWqJM30n3gthny@spider-dev.673kr.mongodb.net", "history", "history-post", "")
//as.NewClient("mongodb+srv://spider-data-history:wYxoSKhlt6Np7060@spider-dev.673kr.mongodb.net/", "history", "history-post", "")
}

func (*Mongo) NewClient(uri, database, collection string, pipeline interface{}) interface{} {
client, err := mongo.NewMongoDBConnection(context.TODO(), uri)
if err != nil {
Expand Down

0 comments on commit 77f791e

Please sign in to comment.