Documentation
¶
Overview ¶
Package advargs provides type-safe parsing and validation for ZapScript advanced arguments using struct tags and the go-playground/validator library.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var DefaultParser = NewParser()
DefaultParser is a convenience parser for simple use cases.
Functions ¶
func IsActionDetails ¶
IsActionDetails returns true if the action is "details" (case-insensitive).
func IsActionRun ¶
IsActionRun returns true if the action is "run" or empty (case-insensitive).
func IsModeShuffle ¶
IsModeShuffle returns true if the mode is "shuffle" (case-insensitive).
func Parse ¶
func Parse(raw map[string]string, dest any, ctx *ParseContext) error
Parse is a convenience function using the default parser.
func ShouldRun ¶
func ShouldRun(g advargtypes.GlobalArgs) bool
ShouldRun returns true if the command should execute based on the When condition.
Types ¶
type ParseContext ¶
type ParseContext struct {
LauncherIDs []string
}
ParseContext provides runtime context for validation.
func NewParseContext ¶
func NewParseContext(launcherIDs []string) *ParseContext
NewParseContext creates a ParseContext from a list of launcher IDs.