code

package
v0.2.7-beta.2 Latest Latest
Warning

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

Go to latest
Published: Feb 26, 2026 License: ISC Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrRemoveKey = errors.New("internal.remove_variable")

Functions

func ExtractArgsFrom

func ExtractArgsFrom(in string) []string

Similar to strings.Fields(), except it recognizes quoted elements.

func ExtractResourceFrom

func ExtractResourceFrom(line string) string

func ExtractVariablesFrom

func ExtractVariablesFrom(in string) []string

func GetIndentOf

func GetIndentOf(line string) (indent int)

func GetIndentString

func GetIndentString(indent int) string

func IsStringifiable

func IsStringifiable(variable Variable) bool

func SubstituteArray

func SubstituteArray(file *drive.JsonFile, env Env, path string) error

func SubstituteJsonFile

func SubstituteJsonFile(file *drive.JsonFile, env Env) error

func SubstituteObject

func SubstituteObject(file *drive.JsonFile, env Env, path string) error

func SubstituteSmartString

func SubstituteSmartString(file *drive.JsonFile, env Env, path string, value Variable) error

func SubstituteString

func SubstituteString(in string, env Env) (string, error)

func TypeOf

func TypeOf(variable Variable) gjson.Type

func WriteIndentString

func WriteIndentString(writer io.Writer, indent int)

Types

type Columns

type Columns []string

type Env

type Env struct {
	Iterators map[string]Columns
	Variables map[string]Variable
}

func NewEnv

func NewEnv() Env

type Node

type Node struct {
	Parent   *Node
	Body     string
	Children []*Node
}

func NewNode

func NewNode(parent *Node, body string) *Node

func (*Node) Append

func (node *Node) Append(child *Node)

func (*Node) EndsWithBackslash

func (node *Node) EndsWithBackslash() bool

func (*Node) ExtractResource

func (node *Node) ExtractResource() string

func (*Node) Format

func (node *Node) Format(location string) *Node

func (*Node) IsRoot

func (node *Node) IsRoot() bool

func (*Node) MakeErrorContext

func (node *Node) MakeErrorContext(i int) liberrors.Context

func (*Node) Print

func (node *Node) Print(writer io.Writer, indent int)

func (*Node) String

func (node *Node) String() string

type Rows

type Rows []Columns

type SimpleVariable

type SimpleVariable string

func (SimpleVariable) String

func (variable SimpleVariable) String() string

func (SimpleVariable) Value

func (variable SimpleVariable) Value() any

type Variable

type Variable interface {
	String() string
	Value() any
}

func Query

func Query(variable Variable, path string) Variable

Jump to

Keyboard shortcuts

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