{"id":26647125,"url":"https://github.com/codomatech/spluggy","last_synced_at":"2025-09-19T00:26:56.668Z","repository":{"id":57547467,"uuid":"302588418","full_name":"codomatech/spluggy","owner":"codomatech","description":"Static (i.e. compile-time) plugins for go","archived":false,"fork":false,"pushed_at":"2020-10-12T17:02:29.000Z","size":14,"stargazers_count":25,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-24T23:51:31.745Z","etag":null,"topics":["code-generation","golang","plugins","static-analysis"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codomatech.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-10-09T09:03:04.000Z","updated_at":"2023-09-27T21:38:56.000Z","dependencies_parsed_at":"2022-09-26T18:40:55.508Z","dependency_job_id":null,"html_url":"https://github.com/codomatech/spluggy","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codomatech%2Fspluggy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codomatech%2Fspluggy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codomatech%2Fspluggy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codomatech%2Fspluggy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codomatech","download_url":"https://codeload.github.com/codomatech/spluggy/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248329748,"owners_count":21085595,"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":["code-generation","golang","plugins","static-analysis"],"created_at":"2025-03-24T23:51:03.441Z","updated_at":"2025-09-19T00:26:51.554Z","avatar_url":"https://github.com/codomatech.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `spluggy`: compile-time plugins for go\n\nOrganizing your code as plugins has many benefits, Go provides [excellent support for them](https://golang.org/pkg/plugin/).\nThe caveat (beside dependency hell) is that you lose the cool, single-binary advantage of Go.\n\n`spluggy` gets you the best of both worlds: static plugins.\nYou define your plugins as sub-packages within the same package. As long as they all expose a function with the same name,\n`spluggy` will discover them automatically and make the function accessible for external packages.\n\n\n## Usage\n\nA functioning app is in [example](example) which demonstrates how to use `spluggy` using `go generate`.\nThe commend line interface is:\n\n```\nUsage: spluggy \u003cflags\u003e \u003cpackage directory\u003e\n\nWith flags:\n\n  -func string\n    \tThe exposed function name\n  -out string\n    \tOutput file name (default \"plugins.go\")\n  -pkg string\n    \tThe base package\n  -v\tEnable verbose output\n\n```\n\n## Known Limitations\n\nCurrently `spluggy` cannot infer struct type dependencies defined within a `map`, e.g.\n\n```go\n// spluggy cannot infer that \"somepackage\" shoud be imported \nfunc Fn(map[somepackage.SomeStructType]int) {\n    ...\n}\n```\n\nThis will be addressed in the next version.\n\n---\n`spluggy` is a work of :heart: by [Codoma.tech](https://www.codoma.tech/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodomatech%2Fspluggy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodomatech%2Fspluggy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodomatech%2Fspluggy/lists"}