{"id":48470236,"url":"https://github.com/malisetti/gowire-example","last_synced_at":"2026-04-07T06:03:09.851Z","repository":{"id":196472788,"uuid":"695459681","full_name":"malisetti/gowire-example","owner":"malisetti","description":"Package design in Golang with wire DI","archived":false,"fork":false,"pushed_at":"2023-09-26T16:37:43.000Z","size":63,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-12T05:55:19.988Z","etag":null,"topics":["depencyinjection","golang","wire"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/malisetti.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,"governance":null}},"created_at":"2023-09-23T08:48:01.000Z","updated_at":"2023-09-28T09:07:24.000Z","dependencies_parsed_at":null,"dependency_job_id":"1ec9f280-5ed6-46a2-9b84-5da0ef4ab0c1","html_url":"https://github.com/malisetti/gowire-example","commit_stats":null,"previous_names":["malisetti/gowire-example"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/malisetti/gowire-example","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/malisetti%2Fgowire-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/malisetti%2Fgowire-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/malisetti%2Fgowire-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/malisetti%2Fgowire-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/malisetti","download_url":"https://codeload.github.com/malisetti/gowire-example/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/malisetti%2Fgowire-example/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31501903,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-07T03:10:19.677Z","status":"ssl_error","status_checked_at":"2026-04-07T03:10:13.982Z","response_time":105,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["depencyinjection","golang","wire"],"created_at":"2026-04-07T06:03:09.496Z","updated_at":"2026-04-07T06:03:09.842Z","avatar_url":"https://github.com/malisetti.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gowire-example\n\n## Overview\nThis is a demonstration of a Go application that utilizes the Wire framework for dependency injection. The application is an HTTP server that exposes string transformations as an API. It accepts requests with parameters such as  `/?transform=0\u0026message=hello` to perform various string transformations.\n\n## Packages\n- `cmd/hello` is the main package which uses other packages and starts a http server\n- `config` is the package to contain individual configs and combined together the whole app configuration\n- `handlers` package contains http handlers\n- `hello` package contains domain specific transform functionality\n- `server` package uses available handlers, configuration to expose a http mux at different end points\n- `valet` package is an example to extend the functionality from `hello` package\n\n## Wire usage\n- Wire is employed as a compile-time depenedency generation tool\n- Each package contains a `wire.go` where the `injectors` are listed\n- Each package contains `providers` and wire `Set`s\n- Using wire, packages can be loosely coupled and easily testable\n\n## Package design considerations\n- Each type declares the interfaces that it depends on and also describes its own behaviour with an interface\n- If the dependency is known, it goes as property. If it not known then as a functon argument. The type's dependencies are provided by `wire`\n- Keep dependencies to only what are required\n\n## Notes\n- Consider good(simple and clear) APIs\n- Prefer smaller packages\n- Use composition to express clean requirements\n- Recheck and verify the generated wire `injector`s\n\n## References\n- https://github.com/google/wire\n- https://go.dev/blog/wire\n- https://github.com/google/wire/tree/main/docs\n- https://en.wikipedia.org/wiki/SOLID\n\n## PRs are welcome\n\n- Thank you\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmalisetti%2Fgowire-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmalisetti%2Fgowire-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmalisetti%2Fgowire-example/lists"}