Documentation
¶
Index ¶
- func AddFuncs(funcer Funcer)
- func DateFormat(v ...interface{}) string
- func DatetimeFormat(v ...interface{}) string
- func DatetimePretty(v ...interface{}) string
- func Day() string
- func FormBegin(action string, method string, opts ...string) template.HTML
- func FormEnd() template.HTML
- func Lengh(value interface{}) int
- func Month() string
- func Now() time.Time
- func Raw(s string) template.HTML
- func Select(v interface{}, name string, selectOptions []tag.Option, attrs ...interface{}) template.HTML
- func SelectOption(opt tag.Option) template.HTML
- func SelectWith(v interface{}, name string, selectOptions []tag.Option, selectText string, ...) template.HTML
- func TimeFormat(v ...interface{}) string
- func URL(url string) template.URL
- func URLDecode(uri string) string
- func URLEncode(s string) string
- func URLPager(url string, total int, pageIndex int, pageSize ...int) template.HTML
- func Year() string
- type Funcer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DateFormat ¶
func DateFormat(v ...interface{}) string
DateFormat 格式化日期,第一个参数为日期数据,第二个参数为格式化字符串(如果有),第三个参数为默认值(如果有)
func DatetimeFormat ¶
func DatetimeFormat(v ...interface{}) string
DatetimeFormat 日期时间格式化 // arg: 可包含三个参数 1、时间格式(time.Time或*time.Time) 2、格式化字符串(string) 3、空值时返回值字符串(string)
func DatetimePretty ¶
func DatetimePretty(v ...interface{}) string
DatetimePretty 日期时间友好格式化 arg: 可包含三个参数 1、时间格式(time.Time或*time.Time) 2、超过友好格式化范围的格式化字符串(string) 3、空值时返回值字符串(string)
func Select ¶
func Select(v interface{}, name string, selectOptions []tag.Option, attrs ...interface{}) template.HTML
Select 下拉列表
func SelectWith ¶
func SelectWith(v interface{}, name string, selectOptions []tag.Option, selectText string, selectValue string, attrs ...interface{}) template.HTML
SelectWith 下拉列表,附带选择文本
func TimeFormat ¶
func TimeFormat(v ...interface{}) string
TimeFormat 日期时间格式化 // arg: 可包含三个参数 1、时间格式(time.Time或*time.Time) 2、格式化字符串(string) 3、空值时返回值字符串(string)
Types ¶
Click to show internal directories.
Click to hide internal directories.