Documentation
¶
Index ¶
- func AppendAttr(buf StringByteWriter, k, v string)
- func AppendAttrAny(buf StringByteWriter, k string, v any)
- func Dict(args ...any) map[string]any
- func ExposeHelperPanic(e any)
- func FuncMap() template.FuncMap
- func FuzzyBool(value any) bool
- func FuzzyFloat64(v any) float64
- func FuzzyHTML(v any) template.HTML
- func FuzzyHTMLAttrValue(v any) template.HTMLAttr
- func FuzzyHumanBool(str string) (bool, error)
- func FuzzyInt(v any) int
- func FuzzyInt64(v any) int64
- func FuzzyList(v any) []any
- func IsEven(n any) bool
- func IsOdd(n any) bool
- func JSONDict(args ...any) template.JS
- func List(v ...any) []any
- func OptionTag(htmlValue string, modelValue, currentModelValue any, label any, attrs ...any) template.HTML
- func Stringify(v any) string
- func Subst(str string, keysAndValues ...any) string
- func SubstVars(source string, isSourceRawHTML bool, prefix, suffix string, ...) template.HTML
- func SubstVarsStr(source string, prefix, suffix string, replace SubstReplaceFunc) string
- func TryFuzzyInt(v any) (int, bool)
- func TryFuzzyInt64(v any) (int64, bool)
- type Group
- type StringByteWriter
- type SubstReplaceFunc
- type SubstValue
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendAttr ¶ added in v0.2.1
func AppendAttr(buf StringByteWriter, k, v string)
func AppendAttrAny ¶ added in v0.2.1
func AppendAttrAny(buf StringByteWriter, k string, v any)
func ExposeHelperPanic ¶ added in v0.2.1
func ExposeHelperPanic(e any)
ExposeHelperPanic helps to debug panics inside view helpers. Add the following call at the start of a panicing helper:
defer func() { mvphelpers.ExposeHelperPanic(recover()) }()
func FuzzyFloat64 ¶ added in v0.2.1
func FuzzyHTMLAttrValue ¶ added in v0.2.1
func FuzzyHumanBool ¶ added in v0.2.2
FuzzyHumanBool is similar to strconv.ParseBool, but recognizes more on/off.
func FuzzyInt64 ¶ added in v0.2.1
func SubstVarsStr ¶ added in v0.3.1
func SubstVarsStr(source string, prefix, suffix string, replace SubstReplaceFunc) string
func TryFuzzyInt ¶ added in v0.2.1
func TryFuzzyInt64 ¶ added in v0.2.1
Types ¶
type Group ¶
func InGroupsOf ¶
func (Group) PlaceholderCount ¶
func (Group) Placeholders ¶
func (group Group) Placeholders() []struct{}
type StringByteWriter ¶ added in v0.2.2
type StringByteWriter interface { io.StringWriter io.ByteWriter }
type SubstReplaceFunc ¶ added in v0.2.2
func MakeReplaceFunc ¶ added in v0.2.2
func MakeReplaceFunc(values ...SubstValue) SubstReplaceFunc
Click to show internal directories.
Click to hide internal directories.