{"id":22213945,"url":"https://github.com/xmlking/go-workspace","last_synced_at":"2025-07-27T12:31:49.614Z","repository":{"id":57643677,"uuid":"438754986","full_name":"xmlking/go-workspace","owner":"xmlking","description":"Experimenting with golang 1.18 workspaces, fuzzing and generics ","archived":false,"fork":false,"pushed_at":"2023-08-30T14:14:32.000Z","size":3453,"stargazers_count":16,"open_issues_count":4,"forks_count":4,"subscribers_count":3,"default_branch":"main","last_synced_at":"2024-06-22T08:55:06.930Z","etag":null,"topics":["beta","fuzzing","generics","go118","golang","workspaces"],"latest_commit_sha":null,"homepage":"","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/xmlking.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}},"created_at":"2021-12-15T19:52:56.000Z","updated_at":"2024-06-12T14:04:43.000Z","dependencies_parsed_at":"2024-06-19T06:15:59.459Z","dependency_job_id":"e19be994-eb0e-41f6-bc83-92443b6b7be1","html_url":"https://github.com/xmlking/go-workspace","commit_stats":{"total_commits":28,"total_committers":1,"mean_commits":28.0,"dds":0.0,"last_synced_commit":"56e29ddbdd98704fdd802f8728900b7426e4cdcd"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xmlking%2Fgo-workspace","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xmlking%2Fgo-workspace/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xmlking%2Fgo-workspace/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xmlking%2Fgo-workspace/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xmlking","download_url":"https://codeload.github.com/xmlking/go-workspace/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227802821,"owners_count":17822113,"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":["beta","fuzzing","generics","go118","golang","workspaces"],"created_at":"2024-12-02T21:12:42.565Z","updated_at":"2024-12-02T21:12:43.100Z","avatar_url":"https://github.com/xmlking.png","language":"Go","readme":"# go-workspace\n\nExperimenting with **golang-1.18** _multi-module workspaces_\n\n[![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/xmlking/go-workspace)](https://github.com/xmlking/go-workspace/blob/main/go.mod)\n[![Go](https://github.com/xmlking/go-workspace/actions/workflows/go.yml/badge.svg)](https://github.com/xmlking/go-workspace/actions/workflows/go.yml)\n\n\n## Install\n\n### Working with golang 1.18\n\n\n```shell\nbrew install go \n$ go version \ngo version go1.18 darwin/arm64\n```\n\n## Run\n\n```shell\n# run generate first\ngo generate ./...\n```\n\n###\n```shell\n# root module\ngo run ./...\ngo test -v ./... \ngo test -v -fuzz=Fuzz ./internal\n# lib module\ngo test -v ./lib/...\n# app modules\ngo run ./cmd/app1/...\ngo run ./cmd/app2/...\n```\n\n## Build\n\n```shell\ngo generate ./...\ngo build -v .\n# check SBOM\ngo version -m go-workspace\n# run binary\n./go-workspace\n```\n### Workspace commands\n\n```\n$ go help work\nUsage:\n\n        go work \u003ccommand\u003e [arguments]\n\nThe commands are:\n\n        edit        edit go.work from tools or scripts\n        init        initialize workspace file\n        sync        sync workspace build list to modules\n        use         add modules to workspace file\n\n```\n\nRun `go work use -r ./` to recursively add directories in the argument directory with a go.mod file to your workspace. \nIf a directory doesn’t have a go.mod file, or no longer exists, the use directive for that directory is removed from your go.work file.\n\n```shell\n# recursively add directories to go.work\ngo work use -r .\n# pushes the dependencies in the go.work file back into the go.mod files of each workspace module.\ngo work sync\n# provides a command-line interface for editing go.work, for use primarily by tools or scripts.\ngo work edit\n# `go mod` examples\ngo mod download\ngo mod graph\ngo mod tidy\ngo mod verify\ngo work sync\ngo mod why -m github.com/ssoroka/slice\n```\n\n### Project structure \n\n```\n.\n├── README.md\n├── cmd\n│   ├── app1\n│   │   ├── go.mod\n│   │   └── main.go\n│   └── app2\n│       ├── go.mod\n│       └── main.go\n├── go.work\n├── go.work.sum\n└── lib\n    ├── binaryheap\n    │   ├── binaryheap.go\n    │   └── binaryheap_test.go\n    ├── filter\n    │   ├── filter.go\n    │   └── filter_test.go\n    └── go.mod\n\n```\n\n## Reference \n- [Proposal: Multi-Module Workspaces](https://go.googlesource.com/proposal/+/master/design/45713-workspace.md)\n- [Get familiar with workspaces](https://go.dev/blog/get-familiar-with-workspaces?utm_source=GO\u0026utm_medium=social+\u0026utm_campaign=blog+promo)","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxmlking%2Fgo-workspace","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxmlking%2Fgo-workspace","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxmlking%2Fgo-workspace/lists"}