From 617a00aaff6b2cefa9f2c7594260220ccd139a7c Mon Sep 17 00:00:00 2001 From: Roshan Piyush Date: Sat, 17 Feb 2024 15:50:53 +0530 Subject: [PATCH] Cleanup community service --- services/community/api/auth/token.go | 8 ++--- .../community/api/config/Initialize_mongo.go | 2 +- .../api/controllers/coupon_controller.go | 16 ++++----- .../api/controllers/post_controller.go | 6 ++-- services/community/api/models/comments.go | 2 +- services/community/api/models/coupon.go | 9 ++--- services/community/api/models/post.go | 9 +++-- services/community/api/models/user.go | 18 +++++++--- services/community/api/router/routes.go | 10 +++--- services/community/api/seed/seeder.go | 23 ++++++++----- services/community/api/server.go | 5 +-- .../vendor/github.com/badoux/checkmail/go.mod | 3 -- .../vendor/github.com/go-stack/stack/go.mod | 1 - .../vendor/github.com/golang/snappy/go.mod | 1 - .../vendor/github.com/google/uuid/go.mod | 1 - .../vendor/github.com/gorilla/mux/go.mod | 3 -- .../vendor/github.com/jinzhu/gorm/go.mod | 14 -------- .../vendor/github.com/jinzhu/gorm/go.sum | 33 ------------------- .../github.com/jinzhu/inflection/go.mod | 1 - .../community/vendor/github.com/lib/pq/go.mod | 3 -- services/community/vendor/modules.txt | 19 ++++++++--- 21 files changed, 77 insertions(+), 110 deletions(-) delete mode 100644 services/community/vendor/github.com/badoux/checkmail/go.mod delete mode 100644 services/community/vendor/github.com/go-stack/stack/go.mod delete mode 100644 services/community/vendor/github.com/golang/snappy/go.mod delete mode 100644 services/community/vendor/github.com/google/uuid/go.mod delete mode 100644 services/community/vendor/github.com/gorilla/mux/go.mod delete mode 100644 services/community/vendor/github.com/jinzhu/gorm/go.mod delete mode 100644 services/community/vendor/github.com/jinzhu/gorm/go.sum delete mode 100644 services/community/vendor/github.com/jinzhu/inflection/go.mod delete mode 100644 services/community/vendor/github.com/lib/pq/go.mod diff --git a/services/community/api/auth/token.go b/services/community/api/auth/token.go index 1b660c27..00e1f58c 100644 --- a/services/community/api/auth/token.go +++ b/services/community/api/auth/token.go @@ -62,14 +62,14 @@ func ExtractTokenID(r *http.Request, db *gorm.DB) (uint32, error) { tokenString := ExtractToken(r) tokenJSON, err := json.Marshal(Token{Token: tokenString}) if err != nil { - log.Printf(err.Error()) + log.Println(err) return 0, err } resp, err := http.Post(tokenVerifyURL, "application/json", bytes.NewBuffer(tokenJSON)) if err != nil { - log.Printf(err.Error()) + log.Println(err) return 0, err } @@ -77,7 +77,7 @@ func ExtractTokenID(r *http.Request, db *gorm.DB) (uint32, error) { token, _, err := new(jwt.Parser).ParseUnverified(tokenString, jwt.MapClaims{}) claims, ok := token.Claims.(jwt.MapClaims) if err != nil { - log.Printf(err.Error()) + log.Println(err) return 0, err } @@ -121,7 +121,7 @@ func Pretty(data interface{}) { return } - fmt.Println(string(b)) + log.Println(string(b)) } // diff --git a/services/community/api/config/Initialize_mongo.go b/services/community/api/config/Initialize_mongo.go index 87abdf7e..976a77f8 100644 --- a/services/community/api/config/Initialize_mongo.go +++ b/services/community/api/config/Initialize_mongo.go @@ -44,7 +44,7 @@ func (server *Server) InitializeMongo(DbDriver, DbUser string, DbPassword string log.Fatal(err) } - fmt.Println("Connected to MongoDB!") + log.Println("Connected to MongoDB!") } diff --git a/services/community/api/controllers/coupon_controller.go b/services/community/api/controllers/coupon_controller.go index 33b87361..bcffa2f0 100644 --- a/services/community/api/controllers/coupon_controller.go +++ b/services/community/api/controllers/coupon_controller.go @@ -16,9 +16,9 @@ package controllers import ( "encoding/json" - "io/ioutil" + "io" + "log" "net/http" - "fmt" "crapi.proj/goservice/api/models" "crapi.proj/goservice/api/responses" @@ -29,7 +29,7 @@ import ( //@params ResponseWriter, Request //Server have database connection func (s *Server) AddNewCoupon(w http.ResponseWriter, r *http.Request) { - body, err := ioutil.ReadAll(r.Body) + body, err := io.ReadAll(r.Body) if err != nil { responses.ERROR(w, http.StatusBadRequest, err) return @@ -56,26 +56,26 @@ func (s *Server) AddNewCoupon(w http.ResponseWriter, r *http.Request) { //@params ResponseWriter, Request //Server have database connection func (s *Server) ValidateCoupon(w http.ResponseWriter, r *http.Request) { - + //coupon := models.CouponBody{} var bsonMap bson.M - body, err := ioutil.ReadAll(r.Body) + body, err := io.ReadAll(r.Body) if err != nil { responses.ERROR(w, http.StatusBadRequest, err) - fmt.Println("No payload for ValidateCoupon", body, err) + log.Println("No payload for ValidateCoupon", body, err) return } err = json.Unmarshal(body, &bsonMap) if err != nil { responses.ERROR(w, http.StatusUnprocessableEntity, err) - fmt.Println("Failed to read json body", err) + log.Println("Failed to read json body", err) return } couponData, err := models.ValidateCode(s.Client, s.DB, bsonMap) if err != nil { - fmt.Println("Error fetching Coupon", couponData, err) + log.Println("Error fetching Coupon", couponData, err) responses.JSON(w, http.StatusInternalServerError, err) return } diff --git a/services/community/api/controllers/post_controller.go b/services/community/api/controllers/post_controller.go index 7115881f..b17ec25b 100644 --- a/services/community/api/controllers/post_controller.go +++ b/services/community/api/controllers/post_controller.go @@ -16,7 +16,7 @@ package controllers import ( "encoding/json" - "io/ioutil" + "io" "net/http" "strconv" @@ -31,7 +31,7 @@ import ( //Server have database connection func (s *Server) AddNewPost(w http.ResponseWriter, r *http.Request) { - body, err := ioutil.ReadAll(r.Body) + body, err := io.ReadAll(r.Body) if err != nil { responses.ERROR(w, http.StatusBadRequest, err) return @@ -111,7 +111,7 @@ func (s *Server) GetPost(w http.ResponseWriter, r *http.Request) { func (s *Server) Comment(w http.ResponseWriter, r *http.Request) { vars := mux.Vars(r) - body, err := ioutil.ReadAll(r.Body) + body, err := io.ReadAll(r.Body) if err != nil { responses.ERROR(w, http.StatusBadRequest, err) return diff --git a/services/community/api/models/comments.go b/services/community/api/models/comments.go index 78e5ec22..34a6db83 100644 --- a/services/community/api/models/comments.go +++ b/services/community/api/models/comments.go @@ -47,7 +47,7 @@ func CommentOnPost(client *mongo.Client, postComment Comments) (Post, error) { //Add comment in post updatePost.Comments = append(updatePost.Comments, comments) - update := bson.D{{"$set", bson.D{{"comments", updatePost.Comments}}}} + update := bson.D{{Key: "$set", Value: bson.D{{Key: "comments", Value: updatePost.Comments}}}} collection := client.Database("crapi").Collection("post") diff --git a/services/community/api/models/coupon.go b/services/community/api/models/coupon.go index e1bcee32..171772b7 100644 --- a/services/community/api/models/coupon.go +++ b/services/community/api/models/coupon.go @@ -17,13 +17,14 @@ package models import ( "context" "errors" - "fmt" "html" + "log" "strings" "time" + "github.com/jinzhu/gorm" - "go.mongodb.org/mongo-driver/mongo" "go.mongodb.org/mongo-driver/bson" + "go.mongodb.org/mongo-driver/mongo" ) //Coupon @@ -63,9 +64,9 @@ func SaveCoupon(client *mongo.Client, coupon Coupon) (Coupon, error) { // Insert a single document insertResult, err := collection.InsertOne(context.TODO(), coupon) if err != nil { - fmt.Println(err) + log.Println(err) } - fmt.Println("Inserted a single document: ", insertResult.InsertedID) + log.Println("Inserted a single document: ", insertResult.InsertedID) return coupon, err } diff --git a/services/community/api/models/post.go b/services/community/api/models/post.go index a6c11de1..71f9fabd 100644 --- a/services/community/api/models/post.go +++ b/services/community/api/models/post.go @@ -17,7 +17,6 @@ package models import ( "context" "errors" - "fmt" "html" "log" "reflect" @@ -84,7 +83,7 @@ func SavePost(client *mongo.Client, post Post) (Post, error) { collection := client.Database("crapi").Collection("post") _, err := collection.InsertOne(context.TODO(), post) if err != nil { - fmt.Println(err) + log.Println(err) } return post, err @@ -96,7 +95,7 @@ func GetPostByID(client *mongo.Client, ID string) (Post, error) { //filter := bson.D{{"name", "Ash"}} collection := client.Database("crapi").Collection("post") - filter := bson.D{{"id", ID}} + filter := bson.D{{Key: "id", Value: ID}} err := collection.FindOne(context.TODO(), filter).Decode(&post) return post, err @@ -108,7 +107,7 @@ func FindAllPost(client *mongo.Client, offset int, limit int) ([]interface{}, er post := []Post{} options := options.Find() - options.SetSort(bson.D{{"_id", -1}}) + options.SetSort(bson.D{{Key: "_id", Value: -1}}) options.SetLimit(int64(limit)) options.SetSkip(int64(offset * limit)) collection := client.Database("crapi").Collection("post") @@ -116,7 +115,7 @@ func FindAllPost(client *mongo.Client, offset int, limit int) ([]interface{}, er if err != nil { log.Println(err) } - fmt.Println(cur) + log.Println(cur) objectType := reflect.TypeOf(post).Elem() var list = make([]interface{}, 0) defer cur.Close(context.Background()) diff --git a/services/community/api/models/user.go b/services/community/api/models/user.go index 4d3d995c..1c6e44f8 100644 --- a/services/community/api/models/user.go +++ b/services/community/api/models/user.go @@ -16,13 +16,14 @@ package models import ( "errors" + "log" "strings" "time" "github.com/badoux/checkmail" "github.com/jinzhu/gorm" "golang.org/x/crypto/bcrypt" - + "encoding/base64" ) @@ -109,18 +110,27 @@ func FindAuthorByEmail(email string, db *gorm.DB) (*uint64, error) { //fetch id and number from for token user row := db.Table("user_login").Where("email LIKE ?", email).Select("id,number").Row() - row.Scan(&id, &number) + err = row.Scan(&id, &number) + if err != nil { + log.Println("Error in FindAuthorByEmail", err) + } autherID = id //fetch name and picture from for token user row1 := db.Table("user_details").Where("user_id = ?", id).Select("name, lo_get(picture)").Row() - row1.Scan(&name, &picture) + err = row1.Scan(&name, &picture) + if err != nil { + log.Println("Error in FindAuthorByEmail", err) + } if len(picture) > 0 { picurl = "data:image/jpeg;base64," + base64.StdEncoding.EncodeToString(picture) } nickname = name row2 := db.Table("vehicle_details").Where("owner_id = ?", id).Select("uuid").Row() - row2.Scan(&uuid) + err = row2.Scan(&uuid) + if err != nil { + log.Println("Error in FindAuthorByEmail", err) + } vehicleID = uuid return number, err } diff --git a/services/community/api/router/routes.go b/services/community/api/router/routes.go index 63032e5e..22f924c3 100644 --- a/services/community/api/router/routes.go +++ b/services/community/api/router/routes.go @@ -15,7 +15,7 @@ package router import ( - "fmt" + "log" "net/http" "os" "time" @@ -29,10 +29,10 @@ import ( type Server config.Server -var controller = controllers.Server{} // initializeRoutes initialize routes of url with Authentication or without Authentication func (server *Server) InitializeRoutes() *mux.Router { + var controller = controllers.Server{} controller.DB = server.DB @@ -59,7 +59,7 @@ func (server *Server) InitializeRoutes() *mux.Router { } func (server *Server) Run(addr string) { - fmt.Println("Listening to port " + os.Getenv("SERVER_PORT")) + log.Println("Listening to port " + os.Getenv("SERVER_PORT")) srv := &http.Server{ Addr: addr, Handler: server.Router, @@ -79,12 +79,12 @@ func (server *Server) Run(addr string) { } err := srv.ListenAndServeTLS(certificate, key) if err != nil { - fmt.Println(err) + log.Println(err) } } else { err := srv.ListenAndServe() if err != nil { - fmt.Println(err) + log.Println(err) } } } diff --git a/services/community/api/seed/seeder.go b/services/community/api/seed/seeder.go index 296d8a94..aa9cdaec 100644 --- a/services/community/api/seed/seeder.go +++ b/services/community/api/seed/seeder.go @@ -16,7 +16,7 @@ package seed import ( "context" - "fmt" + "log" "os" "time" @@ -70,20 +70,27 @@ func LoadMongoData(mongoClient *mongo.Client, db *gorm.DB) { // get a MongoDB document using the FindOne() method err := collection.FindOne(context.TODO(), bson.D{}).Decode(&couponResult) if err != nil { - for i, _ := range coupons { + for i := range coupons { couponData, err := collection.InsertOne(context.TODO(), coupons[i]) - fmt.Println(couponData, err) + log.Println(couponData, err) } } postCollection := mongoClient.Database(os.Getenv("MONGO_DB_NAME")).Collection("post") er := postCollection.FindOne(context.TODO(), bson.D{}).Decode(&postResult) if er != nil { - for j, _ := range posts { - models.FindAuthorByEmail(emails[j], db) + for j := range posts { + author, err := models.FindAuthorByEmail(emails[j], db) + if err != nil { + log.Println("Error finding author", err) + continue + } + log.Println(author) posts[j].Prepare() - models.SavePost(mongoClient, posts[j]) - //postData, err := collection.InsertOne(context.TODO(), posts[j]) - //fmt.Println(postData, err) + postData, err := models.SavePost(mongoClient, posts[j]) // Assign the returned values to separate variables + if err != nil { + log.Println("Error saving post", err) + } + log.Println(postData) // Use the returned values as needed } } } diff --git a/services/community/api/server.go b/services/community/api/server.go index c2ac11cb..1758b0c6 100644 --- a/services/community/api/server.go +++ b/services/community/api/server.go @@ -25,8 +25,7 @@ import ( "github.com/joho/godotenv" ) -var server = config.Server{} -var route = router.Server{} + func init() { // loads values from .env into the system @@ -36,6 +35,8 @@ func init() { } func Run() { + var server = config.Server{} + var route = router.Server{} route.Client = server.InitializeMongo("mongodb", os.Getenv("MONGO_DB_USER"), os.Getenv("MONGO_DB_PASSWORD"), os.Getenv("MONGO_DB_PORT"), os.Getenv("MONGO_DB_HOST")) diff --git a/services/community/vendor/github.com/badoux/checkmail/go.mod b/services/community/vendor/github.com/badoux/checkmail/go.mod deleted file mode 100644 index b87f877f..00000000 --- a/services/community/vendor/github.com/badoux/checkmail/go.mod +++ /dev/null @@ -1,3 +0,0 @@ -module github.com/badoux/checkmail - -go 1.14 diff --git a/services/community/vendor/github.com/go-stack/stack/go.mod b/services/community/vendor/github.com/go-stack/stack/go.mod deleted file mode 100644 index 96a53a10..00000000 --- a/services/community/vendor/github.com/go-stack/stack/go.mod +++ /dev/null @@ -1 +0,0 @@ -module github.com/go-stack/stack diff --git a/services/community/vendor/github.com/golang/snappy/go.mod b/services/community/vendor/github.com/golang/snappy/go.mod deleted file mode 100644 index f6406bb2..00000000 --- a/services/community/vendor/github.com/golang/snappy/go.mod +++ /dev/null @@ -1 +0,0 @@ -module github.com/golang/snappy diff --git a/services/community/vendor/github.com/google/uuid/go.mod b/services/community/vendor/github.com/google/uuid/go.mod deleted file mode 100644 index fc84cd79..00000000 --- a/services/community/vendor/github.com/google/uuid/go.mod +++ /dev/null @@ -1 +0,0 @@ -module github.com/google/uuid diff --git a/services/community/vendor/github.com/gorilla/mux/go.mod b/services/community/vendor/github.com/gorilla/mux/go.mod deleted file mode 100644 index df170a39..00000000 --- a/services/community/vendor/github.com/gorilla/mux/go.mod +++ /dev/null @@ -1,3 +0,0 @@ -module github.com/gorilla/mux - -go 1.12 diff --git a/services/community/vendor/github.com/jinzhu/gorm/go.mod b/services/community/vendor/github.com/jinzhu/gorm/go.mod deleted file mode 100644 index 64a42a4e..00000000 --- a/services/community/vendor/github.com/jinzhu/gorm/go.mod +++ /dev/null @@ -1,14 +0,0 @@ -module github.com/jinzhu/gorm - -go 1.12 - -require ( - github.com/denisenkom/go-mssqldb v0.0.0-20191124224453-732737034ffd - github.com/erikstmartin/go-testdb v0.0.0-20160219214506-8d10e4a1bae5 - github.com/go-sql-driver/mysql v1.5.0 - github.com/jinzhu/inflection v1.0.0 - github.com/jinzhu/now v1.0.1 - github.com/lib/pq v1.1.1 - github.com/mattn/go-sqlite3 v1.14.0 - golang.org/x/crypto v0.0.0-20191205180655-e7c4368fe9dd // indirect -) diff --git a/services/community/vendor/github.com/jinzhu/gorm/go.sum b/services/community/vendor/github.com/jinzhu/gorm/go.sum deleted file mode 100644 index d30630b9..00000000 --- a/services/community/vendor/github.com/jinzhu/gorm/go.sum +++ /dev/null @@ -1,33 +0,0 @@ -github.com/PuerkitoBio/goquery v1.5.1/go.mod h1:GsLWisAFVj4WgDibEWF4pvYnkVQBpKBKeU+7zCJoLcc= -github.com/andybalholm/cascadia v1.1.0/go.mod h1:GsXiBklL0woXo1j/WYWtSYYC4ouU9PqHO0sqidkEA4Y= -github.com/denisenkom/go-mssqldb v0.0.0-20191124224453-732737034ffd h1:83Wprp6ROGeiHFAP8WJdI2RoxALQYgdllERc3N5N2DM= -github.com/denisenkom/go-mssqldb v0.0.0-20191124224453-732737034ffd/go.mod h1:xbL0rPBG9cCiLr28tMa8zpbdarY27NDyej4t/EjAShU= -github.com/erikstmartin/go-testdb v0.0.0-20160219214506-8d10e4a1bae5 h1:Yzb9+7DPaBjB8zlTR87/ElzFsnQfuHnVUVqpZZIcV5Y= -github.com/erikstmartin/go-testdb v0.0.0-20160219214506-8d10e4a1bae5/go.mod h1:a2zkGnVExMxdzMo3M0Hi/3sEU+cWnZpSni0O6/Yb/P0= -github.com/go-sql-driver/mysql v1.5.0 h1:ozyZYNQW3x3HtqT1jira07DN2PArx2v7/mN66gGcHOs= -github.com/go-sql-driver/mysql v1.5.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= -github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe h1:lXe2qZdvpiX5WZkZR4hgp4KJVfY3nMkvmwbVkpv1rVY= -github.com/golang-sql/civil v0.0.0-20190719163853-cb61b32ac6fe/go.mod h1:8vg3r2VgvsThLBIFL93Qb5yWzgyZWhEmBwUJWevAkK0= -github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E= -github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc= -github.com/jinzhu/now v1.0.1 h1:HjfetcXq097iXP0uoPCdnM4Efp5/9MsM0/M+XOTeR3M= -github.com/jinzhu/now v1.0.1/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= -github.com/lib/pq v1.1.1 h1:sJZmqHoEaY7f+NPP8pgLB/WxulyR3fewgCM2qaSlBb4= -github.com/lib/pq v1.1.1/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo= -github.com/mattn/go-sqlite3 v1.14.0 h1:mLyGNKR8+Vv9CAU7PphKa2hkEqxxhn8i32J6FPj1/QA= -github.com/mattn/go-sqlite3 v1.14.0/go.mod h1:JIl7NbARA7phWnGvh0LKTyg7S9BA+6gx71ShQilpsus= -github.com/mattn/go-sqlite3 v2.0.1+incompatible h1:xQ15muvnzGBHpIpdrNi1DA5x0+TcBZzsIDwmw9uTHzw= -github.com/mattn/go-sqlite3 v2.0.1+incompatible/go.mod h1:FPy6KqzDD04eiIsT53CuJW3U88zkxoIYsOqkbpncsNc= -golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20190325154230-a5d413f7728c h1:Vj5n4GlwjmQteupaxJ9+0FNOmBrHfq7vN4btdGoDZgI= -golang.org/x/crypto v0.0.0-20190325154230-a5d413f7728c/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w= -golang.org/x/crypto v0.0.0-20191205180655-e7c4368fe9dd h1:GGJVjV8waZKRHrgwvtH66z9ZGVurTD1MT0n1Bb+q4aM= -golang.org/x/crypto v0.0.0-20191205180655-e7c4368fe9dd/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= -golang.org/x/net v0.0.0-20180218175443-cbe0f9307d01/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= -golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= -golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= -golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= -golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= -golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= -golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= diff --git a/services/community/vendor/github.com/jinzhu/inflection/go.mod b/services/community/vendor/github.com/jinzhu/inflection/go.mod deleted file mode 100644 index 2fb76904..00000000 --- a/services/community/vendor/github.com/jinzhu/inflection/go.mod +++ /dev/null @@ -1 +0,0 @@ -module github.com/jinzhu/inflection diff --git a/services/community/vendor/github.com/lib/pq/go.mod b/services/community/vendor/github.com/lib/pq/go.mod deleted file mode 100644 index b5a5639a..00000000 --- a/services/community/vendor/github.com/lib/pq/go.mod +++ /dev/null @@ -1,3 +0,0 @@ -module github.com/lib/pq - -go 1.13 diff --git a/services/community/vendor/modules.txt b/services/community/vendor/modules.txt index 8d118fe4..7e276489 100644 --- a/services/community/vendor/modules.txt +++ b/services/community/vendor/modules.txt @@ -1,36 +1,40 @@ # github.com/badoux/checkmail v0.0.0-20200623144435-f9f80cb795fa -## explicit +## explicit; go 1.14 github.com/badoux/checkmail # github.com/dgrijalva/jwt-go v3.2.0+incompatible ## explicit github.com/dgrijalva/jwt-go # github.com/go-stack/stack v1.8.0 +## explicit github.com/go-stack/stack # github.com/golang/snappy v0.0.1 +## explicit github.com/golang/snappy # github.com/google/uuid v1.1.1 ## explicit github.com/google/uuid # github.com/gorilla/mux v1.7.4 -## explicit +## explicit; go 1.12 github.com/gorilla/mux # github.com/jinzhu/gorm v1.9.14 -## explicit +## explicit; go 1.12 github.com/jinzhu/gorm github.com/jinzhu/gorm/dialects/postgres # github.com/jinzhu/inflection v1.0.0 +## explicit github.com/jinzhu/inflection # github.com/joho/godotenv v1.3.0 ## explicit github.com/joho/godotenv # github.com/klauspost/compress v1.9.5 +## explicit github.com/klauspost/compress/fse github.com/klauspost/compress/huff0 github.com/klauspost/compress/snappy github.com/klauspost/compress/zstd github.com/klauspost/compress/zstd/internal/xxhash # github.com/lib/pq v1.7.0 -## explicit +## explicit; go 1.13 github.com/lib/pq github.com/lib/pq/hstore github.com/lib/pq/oid @@ -39,10 +43,13 @@ github.com/lib/pq/scram ## explicit github.com/lithammer/shortuuid # github.com/pkg/errors v0.8.1 +## explicit github.com/pkg/errors # github.com/xdg/scram v0.0.0-20180814205039-7eeb5667e42c +## explicit github.com/xdg/scram # github.com/xdg/stringprep v0.0.0-20180714160509-73f8eece6fdc +## explicit github.com/xdg/stringprep # go.mongodb.org/mongo-driver v1.3.5 ## explicit @@ -78,12 +85,14 @@ go.mongodb.org/mongo-driver/x/mongo/driver/topology go.mongodb.org/mongo-driver/x/mongo/driver/uuid go.mongodb.org/mongo-driver/x/mongo/driver/wiremessage # golang.org/x/crypto v0.0.0-20200709230013-948cd5f35899 -## explicit +## explicit; go 1.11 golang.org/x/crypto/bcrypt golang.org/x/crypto/blowfish golang.org/x/crypto/pbkdf2 # golang.org/x/sync v0.0.0-20190423024810-112230192c58 +## explicit golang.org/x/sync/semaphore # golang.org/x/text v0.3.3 +## explicit; go 1.11 golang.org/x/text/transform golang.org/x/text/unicode/norm