Versions in this module Expand all Collapse all v1 v1.8.1 May 8, 2019 Changes in this version + const Byte + const Day + const DefaultAvatarSize + const DocURL + const EByte + const GByte + const Hour + const KByte + const MByte + const Minute + const Month + const PByte + const TByte + const TimeLimitCodeLength + const Week + const Year + var UTF8BOM = []byte + func AvatarLink(email string) string + func BasicAuthDecode(encoded string) (string, string, error) + func BasicAuthEncode(username, password string) string + func CreateTimeLimitCode(data string, minutes int, startInf interface{}) string + func DefaultAvatarLink() string + func DetectEncoding(content []byte) (string, error) + func EllipsisString(str string, length int) string + func EncodeMD5(str string) string + func EncodeSha1(str string) string + func EntryIcon(entry *git.TreeEntry) string + func FileSize(s int64) string + func GetRandomBytesAsBase64(n int) string + func HashEmail(email string) string + func Int64sContains(intsSlice []int64, a int64) bool + func Int64sToMap(ints []int64) map[int64]bool + func Int64sToStrings(ints []int64) []string + func IsAudioFile(data []byte) bool + func IsImageFile(data []byte) bool + func IsLetter(ch rune) bool + func IsPDFFile(data []byte) bool + func IsTextFile(data []byte) bool + func IsVideoFile(data []byte) bool + func MinutesToFriendly(minutes int, lang string) string + func NaturalSortLess(s1, s2 string) bool + func RawTimeSince(t time.Time, lang string) string + func RemoveBOMIfPresent(content []byte) []byte + func ShortSha(sha1 string) string + func SizedAvatarLink(email string, size int) string + func StringsToInt64s(strs []string) ([]int64, error) + func Subtract(left interface{}, right interface{}) interface + func TimeSince(then time.Time, lang string) template.HTML + func TimeSincePro(then time.Time, lang string) string + func TimeSinceUnix(then util.TimeStamp, lang string) template.HTML + func TruncateString(str string, limit int) string + func VerifyTimeLimitCode(data string, minutes int, code string) bool + type TplName string