pumped-go

Implement dependency-injected executors, flows, and scopes with pumped-go.

1|Updated May 21, 2025
One-click install
npx skills add https://github.com/pumped-fn/pumped-go --skill pumped-go
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pumped-go
Source: https://github.com/pumped-fn/pumped-go/tree/main/claude-skill/skills/pumped-go
Command: npx skills add https://github.com/pumped-fn/pumped-go --skill pumped-go

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Go developers often reinvent DI, orchestration, and test scaffolding. This skill provides a guided approach to using the pumped-go library to build dependency-injected, reactive patterns with executors, flows, and scopes, increasing consistency and testability across projects.

Core Features & Use Cases

  • Executor patterns: Define package-level executors with Provide and Derive to compose dependencies in a type-safe graph.
  • Flow orchestration: Create short-lived or multi-step flows with tracing and tag-based data passing.
  • Reactive configuration: Use Reactive() and Accessor patterns to automatically re-resolve on config or data changes.
  • Testability: Use WithPreset for mocking executors in tests and perform table-driven tests for coverage.
  • Production readiness: Follow lifecycle patterns with OnCleanup, scope disposal, and graceful shutdown examples.

Quick Start

Install and import pumped-go, declare root scope, define package-level executors (var) as shown in the docs, resolve with pumped.Resolve, and run flows with pumped.Exec. In tests, use pumped.WithPreset to substitute mocks and verify behavior.

Frequently Asked Questions about pumped-go

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I implement dependency injection in Go for testing and flows?

Go dependency injection is structured using package-level executors, scopes, and the Provide and Derive methods to build a type-safe dependency graph. This pattern ensures consistent resolution and enables mocking with WithPreset during table-driven tests.

What is the best way to manage lifecycle and cleanup in Go dependency injection?

Lifecycle management in Go dependency injection relies on OnCleanup hooks and explicit scope disposal to handle resource cleanup. Following these patterns prevents leaks in long-running services by ensuring resources are released during graceful shutdown.

How do I mock dependencies for table-driven tests in Go?

Mocking dependencies for table-driven tests in Go is done using the WithPreset function to substitute mock executors. This allows you to isolate components, verify behavior across different test cases, and achieve high coverage without modifying production dependency graphs.

How does reactive configuration work in Go flows?

Reactive configuration in Go flows uses the Reactive() and Accessor patterns to automatically re-resolve dependencies when configuration or data changes. This approach keeps flows up-to-date without manual restarts, adapting to dynamic environments seamlessly.

Can I use these Go executor patterns for CLIs and APIs?

Yes, these Go executor patterns apply to building real-world services, APIs, and CLIs. The architecture supports short-lived and multi-step flows with proper lifecycle management, making it suitable for various application types requiring dependency-injected designs.

Why should I use a Go dependency injection library instead of manual wiring?

Using a Go dependency injection library prevents reinventing orchestration and test scaffolding by providing guided patterns for executors, flows, and scopes. This increases consistency across projects, improves testability with preset mocking, and ensures proper resource cleanup.