Template

Library for formatting text and html using Go templates.


Source: pkg/lua/lib/template.go | Import: template

Functions


text_parse

text_parse(name, template, data) -> string

Arguments

  • name string
  • template string - A string containing a Go template.
  • data any - The data to pass into the template.
Return Values

  • string
html_parse

html_parse(name, template, data) -> string

Arguments

  • name string
  • template string - A string containing a Go template.
  • data any - The data to pass into the template.
Return Values

  • string
text_parse_file

text_parse_file(path, data) -> string

Arguments

  • path string - Path to the file to parse as a Go template.
  • data any - The data to pass into the template.
Return Values

  • string
html_parse_file

html_parse_file(path, data) -> string

Arguments

  • path string - Path to the file to parse as a Go template.
  • data any - The data to pass into the template.
Return Values

  • string
text_parse_to_file

text_parse_to_file(name, template, outpath, data)

Arguments

  • name string
  • template string - A string containing a Go template.
  • outpath string - Path to the file to output the result to.
  • data any - The data to pass into the template.
html_parse_to_file

html_parse_to_file(name, template, outpath, data)

Arguments

  • name string
  • template string - A string containing a Go template.
  • outpath string - Path to the file to output the result to.
  • data any - The data to pass into the template.
text_parse_file_to_file

text_parse_file_to_file(path, outpath, data)

Arguments

  • path string - Path to the file to parse as a Go template.
  • outpath string - Path to the file to output the result to.
  • data any - The data to pass into the template.
html_parse_file_to_file

html_parse_file_to_file(path, outpath, data)

Arguments

  • path string - Path to the file to parse as a Go template.
  • outpath string - Path to the file to output the result to.
  • data any - The data to pass into the template.