templates

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2020 License: BSD-3-Clause Imports: 13 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddHelpersToRaymond

func AddHelpersToRaymond(tpl *Template)

Where's your docs doc?!

func AddHelpersToTemplate

func AddHelpersToTemplate(tpl *Template)

Where's your docs doc?!

func Helper_add

func Helper_add(lhs, rhs int) int

func Helper_and

func Helper_and(lhs, rhs interface{}) interface{}

func Helper_builtin

func Helper_builtin(str string) interface{}

func Helper_camel

func Helper_camel(value string) string

func Helper_camelT

func Helper_camelT(value string) string

func Helper_concat2

func Helper_concat2(s1, s2 string) string

func Helper_concat3

func Helper_concat3(s1, s2, s3 string) string

func Helper_concat4

func Helper_concat4(s1, s2, s3, s4 string) string

func Helper_concat5

func Helper_concat5(s1, s2, s3, s4, s5 string) string

func Helper_contains

func Helper_contains(str, srch string) string

func Helper_eq

func Helper_eq(lhs, rhs string) interface{}

func Helper_getbetween

func Helper_getbetween(str, lhs, rhs string) string

func Helper_getprefix

func Helper_getprefix(str, suf string) string

func Helper_getsuffix

func Helper_getsuffix(str, suf string) string

func Helper_gokind

func Helper_gokind(input interface{}) string

func Helper_hasprefix

func Helper_hasprefix(str, pre string) string

func Helper_hassuffix

func Helper_hassuffix(str, suf string) string

func Helper_identity

func Helper_identity(thing interface{}) interface{}

func Helper_inc

func Helper_inc(val int) int

func Helper_indent

func Helper_indent(value, indent string) string

func Helper_int_eq

func Helper_int_eq(lhs, rhs int) interface{}

func Helper_int_gt

func Helper_int_gt(lhs, rhs int) interface{}

func Helper_int_gte

func Helper_int_gte(lhs, rhs int) interface{}

func Helper_int_lt

func Helper_int_lt(lhs, rhs int) interface{}

func Helper_int_lte

func Helper_int_lte(lhs, rhs int) interface{}

func Helper_int_ne

func Helper_int_ne(lhs, rhs int) interface{}

func Helper_join2

func Helper_join2(sep, s1, s2 string) string

func Helper_join3

func Helper_join3(sep, s1, s2, s3 string) string

func Helper_join4

func Helper_join4(sep, s1, s2, s3, s4 string) string

func Helper_join5

func Helper_join5(sep, s1, s2, s3, s4, s5 string) string

func Helper_json

func Helper_json(value interface{}, options *raymond.Options) string

func Helper_kebab

func Helper_kebab(value string) string

func Helper_kebabU

func Helper_kebabU(value string) string

func Helper_length

func Helper_length(list interface{}) interface{}

func Helper_listelem

func Helper_listelem(list interface{}, index int) interface{}

func Helper_lower

func Helper_lower(value string) string

func Helper_lwidth

func Helper_lwidth(width string, value string) string

func Helper_ne

func Helper_ne(lhs, rhs string) interface{}

func Helper_or

func Helper_or(lhs, rhs interface{}) interface{}

func Helper_pretty

func Helper_pretty(value interface{}) string

func Helper_printf

func Helper_printf(fmt_str string, args ...interface{}) string

func Helper_printf1

func Helper_printf1(fmt_str string, arg interface{}) string

func Helper_replace

func Helper_replace(str, old, new string, cnt int) string

func Helper_reverse

func Helper_reverse(list interface{}) interface{}

func Helper_rsublist

func Helper_rsublist(list interface{}, start, count int) interface{}

func Helper_rwidth

func Helper_rwidth(width string, value string) string

func Helper_snake

func Helper_snake(value string) string

func Helper_snakeU

func Helper_snakeU(value string) string

func Helper_split

func Helper_split(str, sep string) []string

func Helper_string

func Helper_string(str string) string

func Helper_sublist

func Helper_sublist(list interface{}, start, count int) interface{}

func Helper_substr

func Helper_substr(str string, start, end int) string

func Helper_ternary

func Helper_ternary(first, second interface{}) interface{}

func Helper_thelist

func Helper_thelist(thing interface{}) interface{}

func Helper_title

func Helper_title(value string) string

func Helper_toml

func Helper_toml(value interface{}, options *raymond.Options) string

func Helper_trimfrom_first

func Helper_trimfrom_first(str, pre string, keep bool) string

func Helper_trimfrom_last

func Helper_trimfrom_last(str, pre string, keep bool) string

func Helper_trimprefix

func Helper_trimprefix(str, pre string) string

func Helper_trimsuffix

func Helper_trimsuffix(str, suf string) string

func Helper_trimto_first

func Helper_trimto_first(str, pre string, keep bool) string

func Helper_trimto_last

func Helper_trimto_last(str, pre string, keep bool) string

func Helper_upper

func Helper_upper(value string) string

func Helper_xml

func Helper_xml(value interface{}, options *raymond.Options) string

func Helper_yaml

func Helper_yaml(value interface{}, options *raymond.Options) string

func RenderTemplate

func RenderTemplate(template *Template, design interface{}) (output string, err error)

Where's your docs doc?!

Types

type Template

type Template struct {
	*raymond.Template
}

func CreateTemplateFromFile

func CreateTemplateFromFile(filename string) (tpl *Template, err error)

func CreateTemplateFromString

func CreateTemplateFromString(name, source string) (tpl *Template, err error)

Where's your docs doc?!

func NewTemplate

func NewTemplate() *Template

func (*Template) Render

func (template *Template) Render(design interface{}) (string, error)

type TemplateMap

type TemplateMap map[string]*Template

func CreateTemplateMapFromFolder

func CreateTemplateMapFromFolder(folder string) (tplMap TemplateMap, err error)

Where's your docs doc?!

func NewMap

func NewMap() TemplateMap

func NewTemplateMap

func NewTemplateMap() TemplateMap

func (TemplateMap) ImportFromFolder

func (M TemplateMap) ImportFromFolder(folder string) error

func (TemplateMap) ImportTemplateFile

func (M TemplateMap) ImportTemplateFile(filename string) error

Jump to

Keyboard shortcuts

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