Documentation ¶
Index ¶
- func Helper_add(lhs, rhs int) int
- func Helper_builtin(str string) any
- func Helper_camel(value string) string
- func Helper_camelT(value string) string
- func Helper_concat(ss ...string) string
- func Helper_contains(str, srch string) string
- func Helper_dict(values ...interface{}) (map[string]interface{}, error)
- func Helper_file(filename string) string
- func Helper_getbetween(str, lhs, rhs string) string
- func Helper_getprefix(str, suf string) string
- func Helper_getsuffix(str, suf string) string
- func Helper_gokind(input interface{}) string
- func Helper_hasprefix(str, pre string) string
- func Helper_hassuffix(str, suf string) string
- func Helper_identity(thing interface{}) interface{}
- func Helper_inc(val int) int
- func Helper_indent(indent interface{}, value string) string
- func Helper_join(sep string, ss ...string) string
- func Helper_json(value interface{}) string
- func Helper_jsoninline(value interface{}) string
- func Helper_kebab(value string) string
- func Helper_kebabU(value string) string
- func Helper_lookup(path string, data any) any
- func Helper_lower(value string) string
- func Helper_pascal(value string) string
- func Helper_pretty(value interface{}) string
- func Helper_replace(str, old, new string, cnt int) string
- func Helper_snake(value string) string
- func Helper_snakeU(value string) string
- func Helper_split(str, sep string) []string
- func Helper_substr(str string, start, end int) string
- func Helper_title(value string) string
- func Helper_toml(value interface{}) string
- func Helper_trimfrom_first(str, pre string, keep bool) string
- func Helper_trimfrom_last(str, pre string, keep bool) string
- func Helper_trimprefix(str, pre string) string
- func Helper_trimspace(str string) string
- func Helper_trimsuffix(str, suf string) string
- func Helper_trimto_first(str, pre string, keep bool) string
- func Helper_trimto_last(str, pre string, keep bool) string
- func Helper_upper(value string) string
- func Helper_xml(value interface{}) string
- func Helper_yaml(value interface{}) string
- type Delims
- type Template
- type TemplateMap
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Helper_add ¶
func Helper_builtin ¶
func Helper_camel ¶
func Helper_camelT ¶
func Helper_concat ¶ added in v0.6.1
func Helper_contains ¶
func Helper_dict ¶ added in v0.6.3
func Helper_file ¶ added in v0.2.8
func Helper_getbetween ¶
func Helper_getprefix ¶
func Helper_getsuffix ¶
func Helper_gokind ¶
func Helper_gokind(input interface{}) string
func Helper_hasprefix ¶
func Helper_hassuffix ¶
func Helper_identity ¶
func Helper_identity(thing interface{}) interface{}
func Helper_inc ¶
func Helper_indent ¶
Helper_indent indents lines of text, skipping the first line. The intended behavior is to match Helm's indent helper
func Helper_join ¶ added in v0.6.1
func Helper_json ¶
func Helper_json(value interface{}) string
func Helper_jsoninline ¶ added in v0.3.2
func Helper_jsoninline(value interface{}) string
jsonl too?
func Helper_kebab ¶
func Helper_kebabU ¶
func Helper_lookup ¶ added in v0.6.4
func Helper_lower ¶
func Helper_pascal ¶ added in v0.6.3
func Helper_pretty ¶
func Helper_pretty(value interface{}) string
func Helper_replace ¶
func Helper_snake ¶
func Helper_snakeU ¶
func Helper_split ¶
func Helper_substr ¶
func Helper_title ¶
func Helper_toml ¶
func Helper_toml(value interface{}) string
func Helper_trimfrom_first ¶
func Helper_trimfrom_last ¶
func Helper_trimprefix ¶
func Helper_trimspace ¶ added in v0.6.3
func Helper_trimsuffix ¶
func Helper_trimto_first ¶
func Helper_trimto_last ¶
func Helper_upper ¶
func Helper_xml ¶
func Helper_xml(value interface{}) string
func Helper_yaml ¶
func Helper_yaml(value interface{}) string
Types ¶
type Template ¶
type Template struct { // Original inputs Name string Source string Delims Delims // golang T *template.Template Buf *bytes.Buffer }
func CreateFromString ¶ added in v0.2.9
Creates a hof Template struct, initializing the correct template system. The system will be inferred if left empty
func (*Template) AddGolangHelpers ¶ added in v0.6.8
func (T *Template) AddGolangHelpers()
func (*Template) Helper_chat ¶ added in v0.6.8
returns the full response object
func (*Template) Helper_gen ¶ added in v0.6.8
returns just the message
func (*Template) Helper_render ¶ added in v0.6.9
todo, should we support turning the content back to an objecct? perhaps better to have different functions for this
type TemplateMap ¶
func NewTemplateMap ¶
func NewTemplateMap() TemplateMap
func (TemplateMap) ImportFromFolder ¶
func (TemplateMap) ImportTemplateFile ¶
func (M TemplateMap) ImportTemplateFile(filename string, delims Delims) error
Click to show internal directories.
Click to hide internal directories.