{"id":51153163,"url":"https://github.com/slaveofcode/golang-monorepo-poc","last_synced_at":"2026-06-26T08:02:02.658Z","repository":{"id":305116344,"uuid":"1021940707","full_name":"slaveofcode/golang-monorepo-poc","owner":"slaveofcode","description":null,"archived":false,"fork":false,"pushed_at":"2025-07-18T09:10:00.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-18T12:33:21.098Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/slaveofcode.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-18T07:34:47.000Z","updated_at":"2025-07-18T09:10:04.000Z","dependencies_parsed_at":"2025-07-18T12:38:27.005Z","dependency_job_id":"d2fdb7a7-4686-4898-bedc-075841eee358","html_url":"https://github.com/slaveofcode/golang-monorepo-poc","commit_stats":null,"previous_names":["slaveofcode/golang-monorepo-poc"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/slaveofcode/golang-monorepo-poc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slaveofcode%2Fgolang-monorepo-poc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slaveofcode%2Fgolang-monorepo-poc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slaveofcode%2Fgolang-monorepo-poc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slaveofcode%2Fgolang-monorepo-poc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/slaveofcode","download_url":"https://codeload.github.com/slaveofcode/golang-monorepo-poc/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slaveofcode%2Fgolang-monorepo-poc/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34808043,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-26T02:00:06.560Z","response_time":106,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2026-06-26T08:01:59.221Z","updated_at":"2026-06-26T08:02:02.652Z","avatar_url":"https://github.com/slaveofcode.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Golang Monorepo Prove of Concept\n\nThis is just POC of golang multi package support using single repository as a monorepo.\n\n## Publish Tags\n\nHere we create git tag using prefix of the submodule (core, plugin-a, plugin-b), followed by the semantic versioning.\n\n```\ngit tag core/v1.0.0\ngit tag plugin-a/v1.0.0\ngit tag plugin-b/v1.0.0\ngit push --tags\n```\n\n## Prove to Use for V1\n\nYou can test those packages by creating a simple golang project with `main.go` file, and write the example code below.\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\n\t\"github.com/slaveofcode/golang-monorepo-poc/core\"\n\tplugina \"github.com/slaveofcode/golang-monorepo-poc/plugin-a\"\n\tpluginb \"github.com/slaveofcode/golang-monorepo-poc/plugin-b\"\n)\n\nfunc main() {\n\tregistry := map[string]core.Plugin{\n\t\t\"plugin-b\": \u0026pluginb.PluginB{},\n\t\t\"plugin-a\": \u0026plugina.PluginA{},\n\t}\n\n\tctx := core.NewContext(registry)\n\n\t// Init all plugins in dependency order\n\tfor _, name := range []string{\"plugin-b\", \"plugin-a\"} {\n\t\tif err := registry[name].Init(ctx); err != nil {\n\t\t\tpanic(err)\n\t\t}\n\t}\n\n\t// Execute top plugin\n\tfmt.Println(\"Executing plugin-a:\")\n\tif err := registry[\"plugin-a\"].Execute(); err != nil {\n\t\tpanic(err)\n\t}\n}\n```\n\n## Next: For Example I Added Core V2 with Breaking Changes\n\nA breaking changes for core plugin is added, the old codebase that refers to plugin-a, plugin-b and core v1 should not be broken. plugin-c is added to use the core v2 as an implementation, so core now should support both v1 \u0026 v2 codebase.\n\nTag the core v2 \u0026 plugin c, make sure no changes in core v1, plugin-a \u0026 plugin-b. If anything changes on them, we should tag them too to maintain consistency.\n```\ngit tag core/v2/v2.0.0\ngit tag plugin-c/v1.0.0\n```\n\nYou can test by creating another project, and puth these code to try\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"github.com/slaveofcode/golang-monorepo-poc/core\"\n\tcorev2 \"github.com/slaveofcode/golang-monorepo-poc/core/v2\"\n\t\"github.com/slaveofcode/golang-monorepo-poc/plugin-a\"\n\t\"github.com/slaveofcode/golang-monorepo-poc/plugin-b\"\n\t\"github.com/slaveofcode/golang-monorepo-poc/plugin-c\"\n)\n\nfunc main() {\n\t// plugin-a \u0026 plugin-b which using v1 core is still supported here\n\tregistryV1 := map[string]core.Plugin{\n\t\t\"plugin-b\": \u0026pluginb.PluginB{},\n\t\t\"plugin-a\": \u0026plugina.PluginA{},\n\t}\n\n\tctxV1 := core.NewContext(registryV1)\n\n\tfor _, name := range []string{\"plugin-b\", \"plugin-a\"} {\n\t\tif err := registryV1[name].Init(ctxV1); err != nil {\n\t\t\tpanic(err)\n\t\t}\n\t}\n\n\tfmt.Println(\"Executing plugin-a:\")\n\tif err := registryV1[\"plugin-a\"].Execute(); err != nil {\n\t\tpanic(err)\n\t}\n\n\t// plugin-c is using newest core/v2\n\tregistryV2 := map[string]corev2.Plugin{\n\t\t\"plugin-c\": \u0026pluginc.PluginC{},\n\t}\n\n\tctxV2 := corev2.NewContext(registryV2)\n\tif err := registryV2[\"plugin-c\"].Init(ctxV2); err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Println(\"Executing plugin-c:\")\n\tif err := registryV2[\"plugin-c\"].Execute(); err != nil {\n\t\tpanic(err)\n\t}\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fslaveofcode%2Fgolang-monorepo-poc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fslaveofcode%2Fgolang-monorepo-poc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fslaveofcode%2Fgolang-monorepo-poc/lists"}