1 В избранное 0 Ответвления 0

OSCHINA-MIRROR/lunny-xweb

Присоединиться к Gitlife
Откройте для себя и примите участие в публичных проектах с открытым исходным кодом с участием более 10 миллионов разработчиков. Приватные репозитории также полностью бесплатны :)
Присоединиться бесплатно
Клонировать/Скачать
template.go 640
Копировать Редактировать Web IDE Исходные данные Просмотреть построчно История
Lunny Xiao Отправлено 22.06.2013 13:50 a25aed5
package xweb
import (
//"fmt"
"html/template"
"time"
)
/*func Add(left interface{}, right interface{}) interface{} {
switch left.(type) {
case int, int64:
switch right.(type) {
case int, int8, int16, int32, int64:
return left.
}
}
}*/
func FormatDate(t time.Time, format string) string {
return t.Format(format)
}
func Eq(left interface{}, right interface{}) bool {
return left == right
}
func Html(raw string) template.HTML {
return template.HTML(raw)
}
var (
defaultFuncs template.FuncMap = template.FuncMap{
"Eq": Eq,
"FormatDate": FormatDate,
"Html": Html,
//"Add": Add,
}
)

Опубликовать ( 0 )

Вы можете оставить комментарий после Вход в систему

1
https://api.gitlife.ru/oschina-mirror/lunny-xweb.git
git@api.gitlife.ru:oschina-mirror/lunny-xweb.git
oschina-mirror
lunny-xweb
lunny-xweb
master