Documentation ¶
Index ¶
- Variables
- func DeepEqual(val, val2 interface{}) bool
- func DeepNotEqual(val, val2 interface{}) bool
- func Divide[V Number](v V, v2 ...V) V
- func Int2Str(i interface{}) string
- func Minus[V Number](v V, v2 ...V) V
- func Multiply[V Number](v V, v2 ...V) V
- func ParseHtml(str string) template.HTML
- func ParseJS(str string) template.JS
- func Plus[V Number](v V, v2 ...V) V
- func PtrValue(v interface{}) interface{}
- func RangeInt(start, end int) []int
- func Remainder[V int | int64](v, v2 V) V
- func Str2Int(str string) int
- func Struct2Map(v interface{}) map[string]interface{}
- func URL(route string, params ...interface{}) string
- func UrlAppend(k string, v interface{}, currentUrl string) string
- func UrlDelete(k, currentUrl string) string
- func Widget(name string, data ...interface{}) template.HTML
- type Number
Constants ¶
This section is empty.
Variables ¶
View Source
var FuncMap = template.FuncMap{ "date": php.Date, "strstr": php.Strstr, "substr": php.Substr, "mb_substr": php.Mb_substr, "strlen": php.Strlen, "mb_strlen": php.Mb_strlen, "strrev": php.Strrev, "str_replace": php.Str_replace, "url": URL, "url_append": UrlAppend, "url_delete": UrlDelete, "range_int": RangeInt, "trim": php.Trim, "parseHtml": ParseHtml, "parseJS": ParseJS, "split": php.Split, "deep_equal": DeepEqual, "deep_notequal": DeepNotEqual, "int2str": Int2Str, "md5": php.Md5, "strip_tags": php.Strip_tags, "ptr_value": PtrValue, "plus_int": Plus[int], "minus_int": Minus[int], "multiply_int": Multiply[int], "divide_int": Divide[int], "remainder_int": Remainder[int], }
传给模板的函数
Functions ¶
func DeepNotEqual ¶ added in v0.1.2
func DeepNotEqual(val, val2 interface{}) bool
func Int2Str ¶
func Int2Str(i interface{}) string
int int8 int16 int32 int64 uint uint8 uint16 uint32 uint64 float32 float64转字符串
func Struct2Map ¶
func Struct2Map(v interface{}) map[string]interface{}
Types ¶
Click to show internal directories.
Click to hide internal directories.