{"id":13601055,"url":"https://github.com/amorist/mango","last_synced_at":"2026-03-02T10:03:55.153Z","repository":{"id":48515931,"uuid":"195349109","full_name":"amorist/mango","owner":"amorist","description":"Use mongo-go-driver  like mgo","archived":false,"fork":false,"pushed_at":"2024-05-15T03:07:08.000Z","size":78,"stargazers_count":40,"open_issues_count":1,"forks_count":7,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-11T01:39:46.866Z","etag":null,"topics":["go","golang","mgo","mongo","mongo-go-driver","mongodb","mongodb-driver"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/amorist.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"amorist"}},"created_at":"2019-07-05T06:11:36.000Z","updated_at":"2024-05-15T03:07:12.000Z","dependencies_parsed_at":"2024-05-15T18:34:01.821Z","dependency_job_id":"eb865b6d-0844-4014-b2b4-199e02f44c1c","html_url":"https://github.com/amorist/mango","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/amorist/mango","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amorist%2Fmango","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amorist%2Fmango/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amorist%2Fmango/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amorist%2Fmango/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/amorist","download_url":"https://codeload.github.com/amorist/mango/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amorist%2Fmango/sbom","scorecard":{"id":190324,"data":{"date":"2025-08-11","repo":{"name":"github.com/amorist/mango","commit":"12a688a32c1d6d2e950798eca9ce40c3b75091b1"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Code-Review","score":0,"reason":"Found 1/15 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 21 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-16T20:32:44.568Z","repository_id":48515931,"created_at":"2025-08-16T20:32:44.568Z","updated_at":"2025-08-16T20:32:44.568Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29998094,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-02T09:59:02.300Z","status":"ssl_error","status_checked_at":"2026-03-02T09:59:02.001Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["go","golang","mgo","mongo","mongo-go-driver","mongodb","mongodb-driver"],"created_at":"2024-08-01T18:00:54.127Z","updated_at":"2026-03-02T10:03:55.081Z","avatar_url":"https://github.com/amorist.png","language":"Go","funding_links":["https://github.com/sponsors/amorist"],"categories":["Go"],"sub_categories":[],"readme":"# mango\n\n\u003cdiv align=\"center\"\u003e\n\u003cimg src=\"./logo/mango.svg\" width = 150\" alt=\"图片名称\"/\u003e\n\n[![GoDoc](https://godoc.org/github.com/amorist/mango?status.svg)](https://godoc.org/github.com/amorist/mango)\n[![Build Status](https://dev.azure.com/amorist/mango/_apis/build/status/amorist.mango?branchName=master)](https://dev.azure.com/amorist/mango/_build/latest?definitionId=1\u0026branchName=master)\n[![dependabot](https://api.dependabot.com/badges/status?host=github\u0026repo=amorist/mango)](https://dependabot.com/)\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Famorist%2Fmango.svg?type=shield)](https://app.fossa.io/projects/git%2Bgithub.com%2Famorist%2Fmango?ref=badge_shield)\n\u003c/div\u003e\n\nUse [mongo-go-driver](https://github.com/mongodb/mongo-go-driver) like [mgo](https://github.com/globalsign/mgo)\n\n- [Installation](#installation)\n- [Usage](#usage)\n- [Doc](#doc)\n\n## installation\n\n`go get -u github.com/amorist/mango`\n\n## usage\n\n```go\npackage main\n\nimport (\n    \"fmt\"\n\n    \"github.com/amorist/mango\"\n\n    \"github.com/amorist/mango/bson\"\n)\n\n// Person person model\ntype Person struct {\n    ID   bson.ObjectID `bson:\"_id\" json:\"_id\"`\n    Name string        `bson:\"name\" json:\"name\"`\n}\n\nfunc main() {\n    session := mango.New(\"mongodb://127.0.0.1\")\n    session.SetPoolLimit(10)\n\n    if err := session.Connect(); err != nil {\n        fmt.Println(err)\n        return\n    }\n\n    // Find find all\n    var result []Person\n    if err := session.DB(\"test\").Collection(\"persons\").Find(bson.M{}).All(\u0026result); err != nil {\n        fmt.Println(err)\n    }\n\n    for _, r := range result {\n        fmt.Println(r.Name)\n    }\n\n    // Update\n    if err := session.DB(\"test\").Collection(\"persons\").Update(bson.M{\"name\": \"name1\"}, bson.M{\"$set\": bson.M{\"name\": \"name2\"}}); err != nil {\n        fmt.Println(err)\n    }\n\n    // Update update all\n    info, err := session.DB(\"test\").Collection(\"persons\").UpdateAll(bson.M{\"name\": \"name1\"}, bson.M{\"$set\": bson.M{\"name\": \"name\"}})\n    if err != nil {\n        fmt.Println(err)\n    }\n    fmt.Println(info)\n\n    // Remove\n    if err := session.DB(\"test\").Collection(\"persons\").Remove(bson.M{\"name\": \"name\"}); err != nil {\n        fmt.Println(err)\n    }\n\n    // RemoveAll\n    if err := session.DB(\"test\").Collection(\"persons\").RemoveAll(bson.M{\"name\": \"name\"}); err != nil {\n        fmt.Println(err)\n    }\n\n    // Insert\n    if err := session.DB(\"test\").Collection(\"persons\").Insert(bson.M{\"name\": \"name\"}); err != nil {\n        fmt.Println(err)\n    }\n\n    // InsertAll\n    var docs []interface{}\n    for index := 0; index \u003c 10; index++ {\n        docs = append(docs, bson.M{\"name\": index})\n    }\n\n    if err := session.DB(\"test\").Collection(\"persons\").InsertAll(docs); err != nil {\n        fmt.Println(err)\n    }\n\n    // Count\n    count, err := session.DB(\"test\").Collection(\"persons\").Count(bson.M{\"name\": \"name\"})\n    if err != nil {\n        fmt.Println(err)\n    }\n    fmt.Println(count)\n}\n```\n\n## doc\n\n[mango](https://godoc.org/github.com/amorist/mango)\n\n\n## License\n[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Famorist%2Fmango.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Famorist%2Fmango?ref=badge_large)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famorist%2Fmango","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Famorist%2Fmango","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famorist%2Fmango/lists"}