Documentation
¶
Index ¶
- func ToJSON(prompt *types.Prompt, pretty bool) (string, error)
- type Option
- type Parser
- func (p *Parser) Close()
- func (p *Parser) ParseFile(filePath string) (*types.Prompt, error)
- func (p *Parser) ParseFileWithVars(filePath string, vars map[string]interface{}) (*types.Prompt, error)
- func (p *Parser) ParseString(code, sourceName string) (*types.Prompt, error)
- func (p *Parser) ParseStringWithVars(code, sourceName string, vars map[string]interface{}) (*types.Prompt, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}
Parser handles parsing of Lua prompt files
func (*Parser) ParseFileWithVars ¶
func (p *Parser) ParseFileWithVars(filePath string, vars map[string]interface{}) (*types.Prompt, error)
ParseFileWithVars parses a Lua prompt file with variables
func (*Parser) ParseString ¶
ParseString parses Lua code from a string
Click to show internal directories.
Click to hide internal directories.