{"id":13413878,"url":"https://github.com/arikama/go-mysql-test-container","last_synced_at":"2026-04-29T12:40:16.626Z","repository":{"id":38238427,"uuid":"424442461","full_name":"arikama/go-mysql-test-container","owner":"arikama","description":"Golang MySQL testcontainer package","archived":false,"fork":false,"pushed_at":"2022-09-30T17:35:02.000Z","size":67,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-07-31T20:52:57.136Z","etag":null,"topics":["docker","mysql","testcontainer"],"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/arikama.png","metadata":{"files":{"readme":"README.md","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":"2021-11-04T02:04:49.000Z","updated_at":"2023-07-05T07:20:02.000Z","dependencies_parsed_at":"2022-09-04T23:50:23.347Z","dependency_job_id":null,"html_url":"https://github.com/arikama/go-mysql-test-container","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arikama%2Fgo-mysql-test-container","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arikama%2Fgo-mysql-test-container/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arikama%2Fgo-mysql-test-container/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arikama%2Fgo-mysql-test-container/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arikama","download_url":"https://codeload.github.com/arikama/go-mysql-test-container/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241717747,"owners_count":20008438,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["docker","mysql","testcontainer"],"created_at":"2024-07-30T20:01:51.799Z","updated_at":"2026-04-29T12:40:16.550Z","avatar_url":"https://github.com/arikama.png","language":"Go","funding_links":[],"categories":["测试","Template Engines","Testing"],"sub_categories":["HTTP客户端","Testing Frameworks","HTTP Clients"],"readme":"# go-mysql-test-container\n\n[![pkg](https://pkg.go.dev/badge/github.com/arikama/go-mysql-test-container.svg)](https://pkg.go.dev/github.com/arikama/go-mysql-test-container)\n[![report](https://goreportcard.com/badge/github.com/arikama/go-mysql-test-container)](https://goreportcard.com/report/github.com/arikama/go-mysql-test-container)\n[![coverage](https://codecov.io/gh/arikama/go-mysql-test-container/branch/master/graph/badge.svg?token=isZCzDyj1N)](https://codecov.io/gh/arikama/go-mysql-test-container)\n[![build](https://github.com/arikama/go-mysql-test-container/actions/workflows/build.yml/badge.svg)](https://github.com/arikama/go-mysql-test-container/actions/workflows/build.yml)\n\nGolang MySQL testcontainer that makes integration testing MySQL a breeze\n\n## Usage\n\nExecute\n\n```\ngo get github.com/arikama/go-mysql-test-container\n```\n\nCode\n\n```go\npackage main\n\nimport (\n\t\"testing\"\n\n\t\"github.com/arikama/go-mysql-test-container/mysqltestcontainer\"\n)\n\nfunc Test(t *testing.T) {\n\tmySql, _ := mysqltestcontainer.Create(\"test\")\n\tdb := mySql.GetDb()\n\terr := db.Ping()\n\tif err != nil {\n\t\tlog.L.Errorln(err.Error())\n\t}\n}\n```\n\n## Development\n\n1. Make sure Docker is installed on your local machine\n\n   ```\n   docker --version\n   ```\n\n2. Make sure you can run Docker locally\n\n   ```\n   docker run hello-world\n   ```\n\n3. Run the test\n\n   ```\n   ./gotest.sh\n   ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farikama%2Fgo-mysql-test-container","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farikama%2Fgo-mysql-test-container","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farikama%2Fgo-mysql-test-container/lists"}