Documentation ¶
Index ¶
- Constants
- Variables
- func DateFormat(tm int64) string
- func GetId(id bson.ObjectId) string
- func GetSlug(str string, isslug bool) string
- func GetTagSlug(caption string) string
- func Gravatar(email string, size int) string
- func LoadTimes(startTime time.Time) string
- func New() string
- func NewLen(length int) string
- func NewLenChars(length int, chars []byte) string
- func Preview(str string, length int) string
- func ToSize(size uint64) string
- type Image
Constants ¶
View Source
const ( // Standard length of uniuri string to achive ~95 bits of entropy. StdLen = 16 // Length of uniurl string to achive ~119 bits of entropy, closest // to what can be losslessly converted to UUIDv4 (122 bits). UUIDLen = 20 )
Variables ¶
View Source
var StdChars = []byte("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789")
Standard characters allowed in uniuri string.
Functions ¶
func DateFormat ¶
func New ¶
func New() string
New returns a new random string of the standard length, consisting of standard characters.
func NewLen ¶
NewLen returns a new random string of the provided length, consisting of standard characters.
func NewLenChars ¶
NewLenChars returns a new random string of the provided length, consisting of the provided byte slice of allowed characters (maximum 256).
Types ¶
Click to show internal directories.
Click to hide internal directories.