{"id":45824069,"url":"https://github.com/browny/inject","last_synced_at":"2026-02-26T21:29:36.429Z","repository":{"id":57581124,"uuid":"98904191","full_name":"browny/inject","owner":"browny","description":"Golang injection framework based on https://github.com/facebookgo/inject","archived":false,"fork":false,"pushed_at":"2017-07-31T16:05:56.000Z","size":6,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-06-20T14:29:25.159Z","etag":null,"topics":["constructor","dependency-injection","golang","injection-framework"],"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/browny.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":"2017-07-31T15:33:00.000Z","updated_at":"2024-06-17T19:11:18.000Z","dependencies_parsed_at":"2022-09-26T19:31:02.876Z","dependency_job_id":null,"html_url":"https://github.com/browny/inject","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/browny/inject","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/browny%2Finject","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/browny%2Finject/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/browny%2Finject/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/browny%2Finject/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/browny","download_url":"https://codeload.github.com/browny/inject/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/browny%2Finject/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29873116,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-26T21:05:00.265Z","status":"ssl_error","status_checked_at":"2026-02-26T20:57:13.669Z","response_time":89,"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":["constructor","dependency-injection","golang","injection-framework"],"created_at":"2026-02-26T21:29:35.569Z","updated_at":"2026-02-26T21:29:36.392Z","avatar_url":"https://github.com/browny.png","language":"Go","readme":"# inject [![GoDoc](https://godoc.org/github.com/browny/inject?status.svg)](http://godoc.org/github.com/browny/inject)\nGolang injection framework based on https://github.com/facebookgo/inject\n\n## Usage\nSee how it works in `inject_test.go` by running `go test`\n\n```go\nfunc (s *InjectTestSuite) TestWeave() {\n\tdriver := example.Driver{}\n\tfarmer := example.Farmer{}\n\tmaster := example.Master{}\n\tmyLogger := example.MyLogger{}\n\ttillageMachine := example.TillageMachine{}\n\n\tdepMap := map[interface{}][]string{\n\t\t\u0026myLogger: []string{\n\t\t\t\"logger\",\n\t\t},\n\t\t\u0026driver: []string{\n\t\t\t\"example.Master.Transport\",\n\t\t},\n\t\t\u0026farmer: []string{\n\t\t\t\"example.Master.Food\",\n\t\t},\n\t\t\u0026tillageMachine: []string{\n\t\t\t\"example.TillageMachine.Machine\",\n\t\t},\n\t\t\u0026master: []string{},\n\t}\n\n\tgraph, err := Weave(depMap)\n\ts.NoError(err)\n\n\tmaster.Food.GetRice()\n\tmaster.Transport.Fly(\"C++\", \"Go\")\n\n\tf := graph[reflect.TypeOf(\u0026example.Farmer{})].(*example.Farmer)\n\tf.Machine.Run(5)\n}\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrowny%2Finject","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrowny%2Finject","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrowny%2Finject/lists"}