Help us shape the future of Go! Take the 2026 Go Developer Survey

blueprint

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Blueprint

type Blueprint struct {
	BaseCommand string
	ShellWords  [][]Token // Tokenized shell words
}

Blueprint represents a parsed command template

func FromArgs

func FromArgs(args []string) (*Blueprint, error)

FromArgs creates a new Blueprint from command arguments using tokenization

func (*Blueprint) BuildCommandArgs

func (bp *Blueprint) BuildCommandArgs(params map[string]interface{}) ([]string, error)

BuildCommandArgs builds the actual command arguments from the template

func (*Blueprint) GenerateInputSchema

func (bp *Blueprint) GenerateInputSchema() *jsonschema.Schema

GenerateInputSchema creates a JSON schema from the tokenized shell words

func (*Blueprint) GetBaseCommand

func (bp *Blueprint) GetBaseCommand() string

GetBaseCommand returns the base command

func (*Blueprint) GetCommandFormat

func (bp *Blueprint) GetCommandFormat() string

GetCommandFormat returns the command format without the "Run the shell command" prefix

func (*Blueprint) GetInputSchema

func (bp *Blueprint) GetInputSchema() interface{}

GetInputSchema returns the input schema

type FieldToken

type FieldToken struct {
	Name         string
	Description  string
	Required     bool
	IsArray      bool   // Indicates if this field represents an array (has ...)
	OriginalFlag string // For boolean flags, stores the original flag format (e.g., "-f", "--verbose")
}

FieldToken represents a template field in a shell word

func (FieldToken) String

func (t FieldToken) String() string

type TextToken

type TextToken struct {
	Value string
}

TextToken represents literal text in a shell word

func (TextToken) String

func (t TextToken) String() string

type Token

type Token interface {
	String() string
}

Token represents a part of a shell word after parsing

Jump to

Keyboard shortcuts

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