preflight

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 30, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	TasksDir       string
	Registry       *tasks.TypeRegistry
	IsInteractive  func() bool
	Force          bool
	SkipValidation bool
	Stderr         io.Writer
	FormInput      io.Reader
	FormOutput     io.Writer
	ClipboardWrite func(string) error
	Logger         *slog.Logger
	ValidationFn   func(context.Context, string, *tasks.TypeRegistry) (tasks.Report, error)
	ValidationForm func(tasks.Report, *tasks.TypeRegistry, io.Writer) (Decision, error)
}

type Decision

type Decision string
const (
	OK        Decision = "ok"
	Continued Decision = "continued"
	Aborted   Decision = "aborted"
	Skipped   Decision = "skipped"
	Forced    Decision = "forced"
)

func Check

func Check(
	ctx context.Context,
	tasksDir string,
	registry *tasks.TypeRegistry,
	isInteractive func() bool,
	force bool,
) (Decision, error)

func CheckConfig

func CheckConfig(ctx context.Context, cfg Config) (Decision, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL