batchutil

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildContext

func BuildContext(steps []StepState) map[string]interface{}

BuildContext creates an interpolation context from completed steps.

func InterpolateParams

func InterpolateParams(params map[string]interface{}, steps []StepState) (map[string]interface{}, error)

InterpolateParams resolves placeholders in params using prior step results.

func InterpolateValue

func InterpolateValue(value interface{}, ctx map[string]interface{}) (interface{}, error)

InterpolateValue recursively resolves placeholders in arbitrary JSON-like data.

func NormalizeBatchParams added in v0.6.0

func NormalizeBatchParams(command string, params map[string]interface{}) map[string]interface{}

NormalizeBatchParams expands shorthand keys for batch operations. It is intentionally command-aware to avoid key collisions.

func SanitizeStepName added in v0.7.0

func SanitizeStepName(name string) string

SanitizeStepName normalizes a batch step name: lowercase, spaces→underscores, strip non-alphanumeric characters (except _).

Types

type StepState

type StepState struct {
	Index   int
	Name    string
	Command string
	OK      bool
	Result  interface{}
	Error   string
}

StepState captures the execution state of a prior batch step.

Jump to

Keyboard shortcuts

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