parser

package
v0.0.0-...-40291e4 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AreFilterStringsInTags

func AreFilterStringsInTags(strs []string) bool

func DoesElementHaveCommandTag

func DoesElementHaveCommandTag(element *Element) bool

func GetChildKeysAsString

func GetChildKeysAsString(element *Element) string

func MainRecurseMap

func MainRecurseMap(m map[interface{}]interface{}, parent *Element) error

main entry point for the parser

func PostProcess

func PostProcess(element *Element, flatParent *Element)

func RecurseMap

func RecurseMap(m map[interface{}]interface{}, parent *Element)

func RecurseSlice

func RecurseSlice(lst []interface{}, parent *Element)

func SimpleElementToMap

func SimpleElementToMap(element *Element) map[interface{}]interface{}

func TruncateString

func TruncateString(str string, length int) string

Types

type Element

type Element struct {
	Content        string
	IsCommand      bool
	Description    string
	Tags           []string
	ChildKeys      *[]string
	Parent         *Element
	ChildrenSorted []*Element
	Children       map[string]*Element
}

represents one element in the yaml file that could be a group or a command

var HistoryTemp *Element = nil

func NewElement

func NewElement(key string, isCommand bool, parent *Element) *Element

func NewFlatParent

func NewFlatParent() *Element

func (Element) String

func (e Element) String() string

Jump to

Keyboard shortcuts

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