Versions in this module Expand all Collapse all v0 v0.0.1 Oct 25, 2023 Changes in this version + const FTDefault + const FTFilter + const FTGenerate + const LoopBreak + const LoopContinue + const ScopeIgnoreIfExist + const ScopeMayDeclare + const ScopeMustDeclare + const ScopeMustNotDeclare + func Check(i ItemControl, MustExist bool) error + func ContentIndicateError(err error) (reflect.Value, error) + func ContentSupressError(err error) (reflect.Value, error) + func GetLengthContent(i ItemControl) int + func MustFunc(fn any, err error) any + func RunTmplFuncs(fs []TmplFunc, out io.Writer, val interface{}) error + func SelectOnMissingError(name string, e error) (reflect.Value, error) + func SelectOnMissingIgnore(name string, e error) (reflect.Value, error) + type AbsPosition struct + FName string + func (p *AbsPosition) Column() int + func (p *AbsPosition) Create(name string) *AbsPosition + func (p *AbsPosition) Line() int + func (p *AbsPosition) Name() string + func (p *AbsPosition) Set(l, c int) PositionFile + func (p *AbsPosition) SetName(name string) + func (p *AbsPosition) String() string + func (p *AbsPosition) Update(msg string) + type BasePosItem struct + func (b *BasePosItem) Errorf(errorFormat string, a ...interface{}) error + func (b *BasePosItem) GetPosition() string + func (b *BasePosItem) PosError(err error) error + func (b *BasePosItem) Position() Position + func (b *BasePosItem) RegisterLoop(l ItemControl, depth int) error + func (b *BasePosItem) SetPosition(pos Position) + type ConditionalItem struct + func CreateConditionalItem(test ItemControlValue, block *ItemControlList) *ConditionalItem + func (i *ConditionalItem) Append(r *ConditionalItem) *ConditionalItem + func (i *ConditionalItem) AppendCondition(test ItemControlValue, block *ItemControlList) *ConditionalItem + func (i *ConditionalItem) AppendElse(block *ItemControlList) *ConditionalItem + func (i *ConditionalItem) Check() error + func (i *ConditionalItem) Create() *ConditionalItem + func (i *ConditionalItem) FuncContent() (TmplFunc, error) + func (i *ConditionalItem) RegisterLoop(l ItemControl, depth int) error + type ConstPosition struct + func CopyPosition(src Position) *ConstPosition + func CreatePositionOffset(start, offset Position) *ConstPosition + func (p *ConstPosition) Column() int + func (p *ConstPosition) CreateCopy(src Position) *ConstPosition + func (p *ConstPosition) CreateOffset(start, offset Position) *ConstPosition + func (p *ConstPosition) Line() int + func (p *ConstPosition) Name() string + func (p *ConstPosition) String() string + type ContentFunctionGet struct + func CreateFunctionGetter(fn interface{}, parm ...ItemControlValue) (*ContentFunctionGet, error) + func (f *ContentFunctionGet) Call(fnp interface{}, v ...reflect.Value) (ret reflect.Value, err error) + func (f *ContentFunctionGet) Create(fn interface{}, addParm int, parm ...ItemControlValue) error + func (f *ContentFunctionGet) GetFunction(v interface{}) (reflect.Value, error) + type ContentFunctionSelect struct + func CreateFunctionSelector(fn interface{}, parm ...ItemControlValue) (*ContentFunctionSelect, error) + func (f *ContentFunctionSelect) Call(fnp interface{}, v ...reflect.Value) (ret reflect.Value, err error) + func (f *ContentFunctionSelect) Create(fn interface{}, addParm int, parm ...ItemControlValue) error + func (f *ContentFunctionSelect) SelectFunction(ud interface{}, v reflect.Value) (reflect.Value, error) + type ContentItem struct + func CreateContentItem() *ContentItem + func (c *ContentItem) AddSelector(f SelectContent) *ContentItem + func (c *ContentItem) Check() error + func (c *ContentItem) Create() *ContentItem + func (c *ContentItem) FuncContent() (TmplFunc, error) + func (c *ContentItem) GetFunction(v interface{}) (reflect.Value, error) + func (c *ContentItem) RenderFunction(w io.Writer, v reflect.Value) error + func (c *ContentItem) SetErrorHandler(hdl OnErrorHdl) *ContentItem + func (c *ContentItem) SetGetter(f GetContent) *ContentItem + func (c *ContentItem) SetRender(f RenderContent) *ContentItem + func (c *ContentItem) Value() (TmplValue, error) + type ContentSelection struct + func CreateSelector(n string) *ContentSelection + func (sel *ContentSelection) Create(n string) *ContentSelection + func (sel *ContentSelection) SelectFunction(ud interface{}, v reflect.Value) (reflect.Value, error) + func (sel *ContentSelection) SetOnMissing(fn SelectOnMissingHdl) *ContentSelection + type ContentStatic struct + func CreateStaticContent(v interface{}) *ContentStatic + func (c *ContentStatic) Create(v interface{}) *ContentStatic + func (c *ContentStatic) GetFunction(v interface{}) (reflect.Value, error) + type ContentValue struct + func CreateValueContent(v ItemControlValue) (*ContentValue, error) + func (c *ContentValue) Create(v ItemControlValue) (*ContentValue, error) + func (c *ContentValue) GetFunction(v interface{}) (reflect.Value, error) + type EmptyItem struct + func CreateDummyItem() *EmptyItem + func CreateEmptyItem(isStart, strip, dontstrip, stripdefault bool) *EmptyItem + func (e *EmptyItem) Content() ([]TmplFunc, error) + func (e *EmptyItem) Create(isStart, strip, dontstrip, stripdefault bool) *EmptyItem + func (e *EmptyItem) FuncContent() (TmplFunc, error) + func (e *EmptyItem) IsStart() bool + func (e *EmptyItem) Length() int + func (e *EmptyItem) Strip(pred bool) bool + func (e *EmptyItem) Value() (TmplValue, error) + type FuncEntry struct + type FuncLookup func(typ FuncType, name string) (any, error) + type FuncManager struct + func CreateFuncManager() *FuncManager + func (m *FuncManager) Add(name string, fn any, typ FuncType) + func (m *FuncManager) Delete(typ FuncType, name string) error + func (m *FuncManager) Filter(typ FuncType, name string) map[string]any + func (m *FuncManager) Lookup(typ FuncType, name string) (any, error) + type FuncType int + func FTCombine(typ ...FuncType) FuncType + func (t FuncType) Add(typ FuncType) FuncType + func (t FuncType) String() string + func (t FuncType) Test(typ FuncType) bool + type GetContent interface + GetFunction func(v interface{}) (reflect.Value, error) + type ItemControl interface + Errorf func(errorFormat string, a ...interface{}) error + GetPosition func() string + PosError func(err error) error + Position func() Position + RegisterLoop func(l ItemControl, depth int) error + SetPosition func(pos Position) + func Position2ItemControl(pos Position) ItemControl + type ItemControlCheckable interface + Check func() error + type ItemControlList struct + func CreateListItem() *ItemControlList + func (cl *ItemControlList) Append(n ...ItemControl) *ItemControlList + func (cl *ItemControlList) Check() error + func (cl *ItemControlList) Content() ([]TmplFunc, error) + func (cl *ItemControlList) Create() *ItemControlList + func (cl *ItemControlList) DoStrip(pred bool) + func (cl *ItemControlList) Length() int + func (cl *ItemControlList) RegisterLoop(l ItemControl, depth int) error + func (cl *ItemControlList) Strip(pred bool) bool + type ItemControlMulti interface + Content func() ([]TmplFunc, error) + Length func() int + type ItemControlPrecompiled struct + func CreatePrecompiledItem(ctnt []TmplFunc) *ItemControlPrecompiled + func (pre *ItemControlPrecompiled) Content() ([]TmplFunc, error) + func (pre *ItemControlPrecompiled) Create(ctnt []TmplFunc) *ItemControlPrecompiled + func (pre *ItemControlPrecompiled) Length() int + type ItemControlSingle interface + FuncContent func() (TmplFunc, error) + type ItemControlStripable interface + DoStrip func(pred bool) + type ItemControlStripper interface + Strip func(pred bool) bool + type ItemControlValue interface + Value func() (TmplValue, error) + type ItemScope struct + func CreateRootScope() *ItemScope + func CreateScope(scp *ItemScope) *ItemScope + func (scp *ItemScope) Create() *ItemScope + func (scp *ItemScope) Declare(name string, val ItemControlValue, declare ItemScopeSet) error + func (scp *ItemScope) Get(name string) ItemControlValue + func (scp *ItemScope) GetDefault(name string, def ItemControlValue) ItemControlValue + func (scp *ItemScope) GetOrCreate(name string, def ItemControlValue) ItemControlValue + func (scp *ItemScope) Set(name string, val ItemControlValue) error + type ItemScopeSet int + type IteratorItem interface + CountValue func() ItemControlValue + EachValue func() (TmplValue, TmplValue, error) + Increment func() ItemControlValue + Init func() ItemControlValue + Test func() ItemControlValue + type LoopControlItem struct + func CreateBreakItem() *LoopControlItem + func CreateContinueItem() *LoopControlItem + func (c *LoopControlItem) Check() error + func (c *LoopControlItem) Create(t loopControl) *LoopControlItem + func (c *LoopControlItem) FuncContent() (TmplFunc, error) + func (c *LoopControlItem) RegisterLoop(l ItemControl, depth int) error + func (c *LoopControlItem) Value() (TmplValue, error) + type LoopItem struct + func CreateLoopItem(init, test, increment ItemControl, block ItemControlMulti) *LoopItem + func CreateValueLoopItem(iter IteratorItem, block ItemControlMulti) *LoopItem + func (l *LoopItem) Append(block ItemControlMulti) *LoopItem + func (l *LoopItem) AppendElse(block ItemControlMulti) *LoopItem + func (l *LoopItem) Check() error + func (l *LoopItem) Create(init, test, increment ItemControl) *LoopItem + func (l *LoopItem) FuncContent() (TmplFunc, error) + func (l *LoopItem) RegisterLoop(i ItemControl, depth int) error + type OnErrorHdl func(err error) (reflect.Value, error) + type Position interface + Column func() int + Line func() int + String func() string + type PositionError interface + Position func() Position + type PositionFile interface + Set func(l, c int) PositionFile + Update func(msg string) + func CreatePosition(name string) PositionFile + type PositionName interface + Name func() string + type RenderContent interface + RenderFunction func(w io.Writer, v reflect.Value) error + type SelectContent interface + SelectFunction func(ud interface{}, v reflect.Value) (reflect.Value, error) + type SelectOnMissingHdl func(name string, innerErr error) (reflect.Value, error) + type SequenceIteratorItem struct + func CreateSequenceDownIteratorItem(start int) *SequenceIteratorItem + func CreateSequenceDownStepIteratorItem(start, step int) *SequenceIteratorItem + func CreateSequenceIteratorItem(limit int) *SequenceIteratorItem + func CreateSequenceRangeIteratorItem(start, step, limit int) *SequenceIteratorItem + func CreateSequenceStepIteratorItem(limit, step int) *SequenceIteratorItem + func (iter *SequenceIteratorItem) CountValue() ItemControlValue + func (iter *SequenceIteratorItem) Create(start, step, limit int) *SequenceIteratorItem + func (iter *SequenceIteratorItem) EachValue() (TmplValue, TmplValue, error) + func (iter *SequenceIteratorItem) Increment() ItemControlValue + func (iter *SequenceIteratorItem) Init() ItemControlValue + func (iter *SequenceIteratorItem) Set(value int) ItemControlValue + func (iter *SequenceIteratorItem) Test() ItemControlValue + func (iter *SequenceIteratorItem) TestAt(limit int, trueAfter bool) ItemControlValue + func (iter *SequenceIteratorItem) Value() (TmplValue, error) + type TextItem struct + func CreateTextItem(txt string) *TextItem + func (t *TextItem) Content() ([]TmplFunc, error) + func (t *TextItem) Create(txt string) *TextItem + func (t *TextItem) DoStrip(pred bool) + func (t *TextItem) FuncContent() (TmplFunc, error) + func (t *TextItem) Length() int + func (t *TextItem) Value() (TmplValue, error) + type TmplFunc func(w io.Writer, val interface{}) error + func GetMultiContent(i ItemControl) ([]TmplFunc, error) + func GetSingleContent(i ItemControl, mergeMulti bool) (TmplFunc, error) + func RenderValue(fn TmplValue) (TmplFunc, error) + type TmplValue func(val interface{}) (reflect.Value, error) + func GetValue(i ItemControl) (TmplValue, error) + type ValueIteratorItem struct + func CreateValueIteratorItem(val ItemControl) *ValueIteratorItem + func (v *ValueIteratorItem) CountValue() ItemControlValue + func (v *ValueIteratorItem) Create(val ItemControl) *ValueIteratorItem + func (v *ValueIteratorItem) EachValue() (TmplValue, TmplValue, error) + func (v *ValueIteratorItem) Increment() ItemControlValue + func (v *ValueIteratorItem) Init() ItemControlValue + func (v *ValueIteratorItem) Test() ItemControlValue + func (v *ValueIteratorItem) Value() (TmplValue, error)