ctx/internal/core/context.go
Ricardo Carneiro 69cadb4ea6 chore: initial scaffold with plugin system and placeholders
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-27 13:43:10 -03:00

27 lines
658 B
Go

package core
import (
"context"
"io"
)
// Context is passed to plugins when their command is executed.
// Allows ctx to inject dependencies and configuration without coupling
// plugins to its internals. Mirrors the pattern used by kubectl plugins.
type Context struct {
// Stdout is where plugins write their primary markdown output.
Stdout io.Writer
// Stderr is where plugins write errors and diagnostic messages.
Stderr io.Writer
// WorkDir is the directory where ctx was invoked.
WorkDir string
// Verbose enables extra diagnostic output when true.
Verbose bool
// Ctx carries deadlines and cancellation signals.
Ctx context.Context
}