{"id":42204510,"url":"https://github.com/thylong/mongo_mock_go_example","last_synced_at":"2026-01-27T00:31:29.222Z","repository":{"id":53209408,"uuid":"71674534","full_name":"thylong/mongo_mock_go_example","owner":"thylong","description":"How to mock MongoDB in Golang","archived":false,"fork":false,"pushed_at":"2018-12-02T13:39:31.000Z","size":6,"stargazers_count":32,"open_issues_count":0,"forks_count":6,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-08-14T04:35:04.805Z","etag":null,"topics":["golang","mgo2","mock","mongodb","testing"],"latest_commit_sha":null,"homepage":"http://thylong.com/golang/2016/mocking-mongo-in-golang/","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thylong.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-10-23T01:11:28.000Z","updated_at":"2024-05-25T02:06:31.000Z","dependencies_parsed_at":"2022-09-03T23:20:54.997Z","dependency_job_id":null,"html_url":"https://github.com/thylong/mongo_mock_go_example","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/thylong/mongo_mock_go_example","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thylong%2Fmongo_mock_go_example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thylong%2Fmongo_mock_go_example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thylong%2Fmongo_mock_go_example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thylong%2Fmongo_mock_go_example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thylong","download_url":"https://codeload.github.com/thylong/mongo_mock_go_example/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thylong%2Fmongo_mock_go_example/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28793339,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-26T21:49:50.245Z","status":"ssl_error","status_checked_at":"2026-01-26T21:48:29.455Z","response_time":59,"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":["golang","mgo2","mock","mongodb","testing"],"created_at":"2026-01-27T00:31:29.083Z","updated_at":"2026-01-27T00:31:29.211Z","avatar_url":"https://github.com/thylong.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"Mongo Mock example in Go\n========================\n\nThis repository contains a simple way to mock Mgo driver.\n\nIf you're interested in it, you can find an article here : http://thylong.com/golang/2016/mocking-mongo-in-golang/\n\n\nInstalling\n==========\n\n.. code-block:: console\n\n    $ git clone git@github.com:thylong/mongo_mock_go_example.git\n\nQuick-start\n===========\n\nIf you want to test only the mock, you can run it this way :\n\n.. code-block:: console\n\n    $ go get github.com/thylong/mongo_mock_go_example\n    $ go run main.go\n\nIf you want to test both the connection to Mongo and the mock, you can use the docker-compose file.\n\n\nNota Bene\n=========\n\nThe code was tested with versions 1.7.* of Go.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthylong%2Fmongo_mock_go_example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthylong%2Fmongo_mock_go_example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthylong%2Fmongo_mock_go_example/lists"}