xcliintfc

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Quantifiable

type Quantifiable interface {
	~int | ~float64 | time.Duration | time.Time
}

Quantifiable defines the strict set of types capable of undergoing inclusive mathematical boundary evaluation tracks within the xcli routing motor.

type ValueParser

type ValueParser interface {
	// ParseAndValidate orchestrates the complete parsing, conversion, and constraint
	// evaluation lifecycle for a single command-line option value.
	//
	// Arguments:
	//   - flag: The primary diagnostic label representing the active terminal token (e.g., "--timeout").
	//   - raw: The raw unparsed text payload extracted from the command arguments collection.
	//   - spec: The complete metadata layout structure defining constraints, defaults, and validations.
	//
	// Returns:
	//   - any: The fully converted, type-safe native Go primitive or slice instance.
	//   - error: Returns an xerrors.IErrorCLI capturing visual telemetry diagnostics if any rule fails.
	ParseAndValidate(flag string, raw string, spec xclistruc.Flag) (any, error)
}

ValueParser encapsulates the unified execution contract required to process, transform, and validate raw command-line terminal arguments into strongly-typed domain instances.

Technical Role:

  • Acts as an inversion-of-control boundary separating the generic string-based CLI router from the underlying native Go representation mapping layers.

Jump to

Keyboard shortcuts

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