package
0.11.91
Repository: https://github.com/g-node/gogs.git
Documentation: pkg.go.dev

# Functions

AppendAvatarSize appends avatar size query parameter to the URL in the correct format.
AvatarLink returns relative avatar link to the site domain by given email, which includes app sub-url as prefix.
BasicAuthDecode decodes username and password portions of HTTP Basic Authentication from encoded content.
BasicAuthEncode encodes username and password in HTTP Basic Authentication format.
CreateTimeLimitCode generates a time limit code based on given input data.
DetectEncoding returns best guess of encoding of given content.
EllipsisString returns a truncated short string, it appends '...' in the end of the length of string is too large.
FileSize calculates the file size and generate user-friendly string.
HashEmail hashes email address to MD5 string.
Int64sToMap converts a slice of int64 to a int64 map.
Int64sToStrings converts a slice of int64 to a slice of string.
No description provided by the author
IsLetter reports whether the rune is a letter (category L).
IsMaliciousPath returns true if given path is an absolute path or contains malicious content which has potential to traverse upper level directories.
No description provided by the author
IsSameSiteURLPath returns true if the URL path belongs to the same site, false otherwise.
IsTextFile returns true if file content format is plain text or empty.
No description provided by the author
MD5 encodes string to MD5 hex value.
MD5Bytes encodes string to MD5 bytes.
RandomString returns generated random string in given length of characters.
No description provided by the author
SHA1 encodes string to SHA1 hex value.
ShortSHA1 truncates SHA1 string length to at most 10.
StringsToInt64s converts a slice of string to a slice of int64.
Subtract deals with subtraction of all types of number.
TimeSince calculates the time interval and generate user-friendly string.
TimeSincePro calculates the time interval and generate full user-friendly string.
TruncateString returns a truncated string with given limit, it returns input string if length is not reached limit.
verify time limit code.

# Constants

No description provided by the author
Seconds-based time units.
No description provided by the author
No description provided by the author
Seconds-based time units.
No description provided by the author
No description provided by the author
Seconds-based time units.
Seconds-based time units.
No description provided by the author
No description provided by the author
No description provided by the author
Seconds-based time units.
Seconds-based time units.