{"id":29117213,"url":"https://github.com/gone-io/gone","last_synced_at":"2026-03-17T16:37:10.010Z","repository":{"id":61839351,"uuid":"552199712","full_name":"gone-io/gone","owner":"gone-io","description":"🚀 Gone - A Lightweight Dependency Injection Framework for Go | Tag-based Auto Injection | Supports Config Center/Lifecycle Management | Provides Rich Ecosystem Components and Scaffolding Tool","archived":false,"fork":false,"pushed_at":"2025-12-15T04:13:48.000Z","size":3047,"stargazers_count":132,"open_issues_count":2,"forks_count":8,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-12-17T10:43:24.719Z","etag":null,"topics":["dependency-injection","di","dig","golang","gone","gone-io","goner","wire"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gone-io.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-10-16T03:27:08.000Z","updated_at":"2025-11-13T02:24:59.000Z","dependencies_parsed_at":"2024-01-31T03:27:14.915Z","dependency_job_id":"319093e3-29f8-415a-bb12-63050dd87fde","html_url":"https://github.com/gone-io/gone","commit_stats":{"total_commits":70,"total_committers":3,"mean_commits":"23.333333333333332","dds":0.09999999999999998,"last_synced_commit":"d4678c5311c44c1b462039aeeb54dc84cd1ea715"},"previous_names":[],"tags_count":89,"template":false,"template_full_name":null,"purl":"pkg:github/gone-io/gone","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gone-io%2Fgone","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gone-io%2Fgone/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gone-io%2Fgone/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gone-io%2Fgone/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gone-io","download_url":"https://codeload.github.com/gone-io/gone/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gone-io%2Fgone/sbom","scorecard":{"id":435205,"data":{"date":"2025-08-11","repo":{"name":"github.com/gone-io/gone","commit":"6b115de8c766088d2985150079f0a29f18589151"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":4.4,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Maintained","score":10,"reason":"30 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/go.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Code-Review","score":0,"reason":"Found 0/13 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/go.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/gone-io/gone/go.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/go.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/gone-io/gone/go.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/go.yml:32: update your workflow using https://app.stepsecurity.io/secureworkflow/gone-io/gone/go.yml/main?enable=pin","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'","Warn: branch protection not enabled for branch 'v2.x'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 30 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-19T04:27:30.125Z","repository_id":61839351,"created_at":"2025-08-19T04:27:30.125Z","updated_at":"2025-08-19T04:27:30.125Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30627211,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-17T14:16:03.965Z","status":"ssl_error","status_checked_at":"2026-03-17T14:16:03.380Z","response_time":56,"last_error":"SSL_read: 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":["dependency-injection","di","dig","golang","gone","gone-io","goner","wire"],"created_at":"2025-06-29T11:14:16.878Z","updated_at":"2026-03-17T16:37:09.979Z","avatar_url":"https://github.com/gone-io.png","language":"Go","readme":"\u003cp\u003e\n   English\u0026nbsp ｜\u0026nbsp \u003ca href=\"README_CN.md\"\u003e中文\u003c/a\u003e\n\u003c/p\u003e\n\n[![license](https://img.shields.io/badge/license-MIT-blue)](LICENSE)\n[![GoDoc](https://pkg.go.dev/badge/github.com/gone-io/gone.jsonvalue?utm_source=godoc)](https://pkg.go.dev/github.com/gone-io/gone/v2)\n[![Go Report Card](https://goreportcard.com/badge/github.com/gone-io/gone)](https://goreportcard.com/report/github.com/gone-io/gone)\n[![codecov](https://codecov.io/gh/gone-io/gone/graph/badge.svg?token=H3CROTTDZ1)](https://codecov.io/gh/gone-io/gone)\n[![Build and Test](https://github.com/gone-io/gone/actions/workflows/go.yml/badge.svg)](https://github.com/gone-io/gone/actions/workflows/go.yml)\n[![Release](https://img.shields.io/github/release/gone-io/gone.svg?style=flat-square)](https://github.com/gone-io/gone/releases)\n[![Mentioned in Awesome Go](https://awesome.re/mentioned-badge.svg)](https://github.com/avelino/awesome-go)\n\n\u003cimg src=\"docs/assert/logo.png\" width = \"100\" alt=\"logo\" /\u003e\n\n\n# 🚀 Gone - Lightweight Dependency Injection Framework for Go\n\n## 💡 Framework Introduction\n\nGone is a lightweight dependency injection framework based on Golang tags, implementing component dependency management through concise annotations. Here is a typical usage example (a struct embedded with gone.Flag, which we call Goner):\n\n```go\ntype Dep struct {\n    gone.Flag\n    Name string\n}\n\ntype Component struct {\n    gone.Flag\n    dep *Dep        `gone:\"*\"` //Dependency injection\n    log gone.Logger `gone:\"*\"` //Inject gone.Logger\n\n    // Inject configuration, get value from environment variable GONE_NAME; \n    // if using components like goner/viper, values can be obtained from config \n    // files or config centers.\n    // Reference documentation: https://github.com/gone-io/goner\n    name string     `gone:\"config:name\"`\n}\n\nfunc (c *Component) Init() {\n    c.log.Infof(c.dep.Name) //Use dependency\n    c.log.Infof(c.name) //Use configuration\n}\n```\n\n## ✨ Core Features\n\n- **Comprehensive Dependency Injection Support**\n  - Struct field injection (supports private fields)\n  - Function parameter injection (auto-matching by type)\n  - Configuration parameter injection (supports environment variables, config centers and config files)\n  - Third-party component injection (via Provider mechanism)\n  👉 [Detailed Documentation](docs/inject.md)\n- Supports defining initialization methods, service start/stop methods and related lifecycle hook functions for Goners, enabling automated service management and custom operations.\n- Provides [ecosystem goner components](https://github.com/gone-io/goner) supporting configuration, logging, database, LLM, observability and more.\n- Provides [scaffolding tool gonectl](https://github.com/gone-io/gonectl) supporting project creation, component management, code generation, test mocking, compilation and running.\n\n### Architecture\n\u003cimg src=\"docs/assert/architecture.png\" width = \"800\" alt=\"architecture\"/\u003e\n\n\n## 🏁 Quick Start\n\n### Environment Preparation\n1. Install required tools\n```bash\ngo install github.com/gone-io/gonectl@latest\ngo install go.uber.org/mock/mockgen@latest\n```\n\n### Create Project\n```bash\ngonectl create myproject\ncd myproject\n```\n\n### Run Project\n```bash\ngo mod tidy\ngonectl run ./cmd/server\n```\n\n## More Documents\n\n- 👉🏻 [docs](./docs)\n- 👉🏻 [goner](https://github.com/gone-io/goner)\n- 👉🏻 [gonectl](https://github.com/gone-io/gonectl)\n\n## Release Notes\n\n👉🏻 https://github.com/gone-io/gone/releases\n\n\n## Contribution\n\nIf you find any bugs or have feature requests, feel free to [submit an issue](https://github.com/gone-io/gone/issues/new)\nor [submit a pull request](https://github.com/gone-io/gone/pulls).\n\n## Contact\n\nIf you have any questions, welcome to contact us through:\n\n- [Github Discussions](https://github.com/gone-io/gone/discussions)\n- Scan QR code to add WeChat, passcode: gone\n\n  \u003cimg src=\"docs/assert/qr_dapeng.png\" width = \"250\" alt=\"dapeng wx qr code\"/\u003e\n\n## License\n\n`gone` is released under the MIT License, see [LICENSE](./LICENSE) for details.\n","funding_links":[],"categories":["Web Frameworks","Web框架"],"sub_categories":["Utility/Miscellaneous","实用程序/Miscellaneous"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgone-io%2Fgone","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgone-io%2Fgone","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgone-io%2Fgone/lists"}