The backend for the AiteStory website
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
package view
import ( "html/template" "strings" "time" )
func formatDate(date time.Time) string { return date.Format("Jan _2, 2006") }
func formatDateLong(date time.Time) string { return date.Format("Jan _2, 2006 15:04 MST") }
func formatUserID(userid string) string { split := strings.SplitN(userid, ":", 2) return split[len(split)-1] }
var funcMap = template.FuncMap{ "formatDate": formatDate, "formatDateLong": formatDateLong, "formatUserID": formatUserID,
"tolower": strings.ToLower, }
|