golang-uber-fx
Build Go Services with Uber Fx
Complex Go services need predictable dependency wiring and lifecycle management. This skill provides practical Uber Fx guidance for modular applications, graceful shutdown, and focused tests.
Установить с помощью моего Агента
Скопируйте этот запрос в своего Агента. Он содержит каноническую страницу Skill и манифест.
Review the Skillstore skill "golang-uber-fx" from https://skillstore.io/skills/samber-golang-uber-fx.md and its manifest at https://skillstore.io/api/skills/samber-golang-uber-fx/manifest. Verify the artifact. You may proceed after verification, subject to the environment's own policy.Ваш Агент по-прежнему должен показать план и запросить все подтверждения, требуемые политикой безопасности.
Ресурсы для AI-агентов
Используйте эти ссылки, когда AI-агенту, crawler или script нужен чистый контекст вместо полной страницы.
Протестировать
Использование «golang-uber-fx». A server constructor starts listening immediately and blocks application startup.
Ожидаемый результат:
- Move listener creation and serving into an OnStart hook.
- Start the blocking serve loop in a goroutine so OnStart returns promptly.
- Register an OnStop hook that performs graceful shutdown with the provided context.
Использование «golang-uber-fx». HTTP, database, metrics, and worker providers are mixed in one composition root.
Ожидаемый результат:
- Create one Fx module for each service area.
- Keep shared configuration and logging providers at the application root.
- Place concern-specific providers, invokes, and decorators inside their owning modules.
Использование «golang-uber-fx». An integration test needs an erroring database without changing the production module.
Ожидаемый результат:
- Compose the existing production module in an fxtest application.
- Replace the database interface with the erroring fake.
- Populate the service under test, start the application, assert behavior, and stop it.
Аудит безопасности
БезопасноAll 88 static findings are false positives. Backtick alerts come from Markdown and Go literals, not command execution. Other matches are benign prompts, examples, official links, metadata, and local test behavior.
Факторы риска
⚙️ Внешние команды (50)
🌐 Доступ к сети (7)
📁 Доступ к файловой системе (1)
🔑 Переменные окружения (2)
⚡ Содержит скрипты (1)
Поделиться и цитировать этот отчет
Делитесь версионным отчетом об оценке, нейтральным значком, встраиваемой карточкой и цитатами. Skillstore публикует доказательства, не решая, безопасен ли этот Skill.
Копировать ссылку на отчёт
https://skillstore.io/skills/samber-golang-uber-fx/audits/1?utm_source=security_passport&utm_medium=share&utm_campaign=versioned_reportЗначок Markdown
[](https://skillstore.io/skills/samber-golang-uber-fx?utm_source=security_passport_badge)Значок HTML
<a href="https://skillstore.io/skills/samber-golang-uber-fx?utm_source=security_passport_badge"><img src="https://skillstore.io/badges/skills/samber-golang-uber-fx/security.svg" alt="Skillstore security assessment" loading="lazy"></a>Встраиваемая карточка
<iframe src="https://skillstore.io/embed/skills/samber-golang-uber-fx.html" title="Skillstore Security Assessment" sandbox="allow-popups allow-popups-to-escape-sandbox" loading="lazy" referrerpolicy="no-referrer" width="420" height="180"></iframe>Академические ссылки (APA · BibTeX · CFF)
Цитата APA
samber. (2026). golang-uber-fx security audit report (audit version 1) [Author version 1.2.2]. Skillstore. https://skillstore.io/skills/samber-golang-uber-fx/audits/1Цитата BibTeX
@techreport{samber-samber-golang-uber-fx-2026,
author = {samber},
title = {golang-uber-fx security audit report (audit version 1)},
institution = {Skillstore},
year = {2026},
number = {1},
url = {https://skillstore.io/skills/samber-golang-uber-fx/audits/1},
note = {Author version 1.2.2}
}CITATION.cff
cff-version: 1.2.0
message: "If you use this Skill, cite its author and this versioned security audit report."
title: "golang-uber-fx security audit report (audit version 1)"
version: "1.2.2"
type: report
authors:
- name: "samber"
date-released: "2026-09-23"
url: "https://skillstore.io/skills/samber-golang-uber-fx/audits/1"
identifiers:
- type: other
value: "skillstore:samber-golang-uber-fx:audit:1"
description: "Skillstore immutable audit report identifier"
Оценка Skillstore
Почему такая оценка Достоверность доказательств: СреднийЧто вы можете построить
Migrate a Go service
Restructure manual application wiring into Fx providers, invokes, modules, and lifecycle hooks.
Standardize service modules
Define reusable HTTP, database, metrics, and worker modules with clear ownership and scoped decorators.
Test dependency graphs
Validate production wiring and replace real dependencies with fakes through fxtest utilities.
Попробуйте эти промпты
Explain how to wire my Go service with Uber Fx. Use these constructors: [constructors]. Identify the required Provide and Invoke calls.
Refactor this startup flow into Fx lifecycle hooks: [current flow]. Keep OnStart nonblocking and implement graceful shutdown with context cancellation.
Design Fx modules for these service areas: [areas]. Show provider ownership, scoped decorators, named dependencies, and value groups where appropriate.
Audit this Uber Fx composition root: [implementation]. Find missing providers, lifecycle hazards, annotation errors, unordered groups, and test gaps. Propose focused fixes.
Лучшие практики
- Keep the composition root small and organize related providers inside named modules.
- Put side effects in lifecycle hooks and honor cancellation during startup and shutdown.
- Validate the production graph in tests and replace external dependencies with focused fakes.
Избегать
- Do not start blocking work inside constructors or synchronous OnStart hooks.
- Do not assume value groups preserve registration order.
- Do not hide required infrastructure behind optional dependencies.
Часто задаваемые вопросы
When should I use Uber Fx?
When is raw Dig a better choice?
Does the skill run my application?
Can it help with graceful shutdown?
Can it help test an Fx application?
Does it choose application-specific dependencies?
Сведения для разработчиков
Автор
samberЛицензия
MIT
Версия автора
v1.2.2
Ревизия Skillstore
r1
Ссылка
2aa351cb09c29b7287d263bd8ea81e9bee3b2a61
Актуальность поддержки
30.09.2026
Использование
0 загрузок · 0 просмотров
Структура файлов