package
0.0.0-20240613153357-3ea8a2466821
Repository: https://github.com/5ht2/taro-bot.git
Documentation: pkg.go.dev

# Packages

No description provided by the author

# Functions

ConvertColorToInt32 will convert 3 uint8s into one int32.
ExtractNode will select the first node to match extractNodeCondition, for example res, err := ExtractNode(string(content), func(str string) bool { return str == "title" }).
No description provided by the author
FormattedNum will insert commas as necessary in large numbers.
FormattedTime will turn seconds into a pretty time representation.
FormattedUserTag will return the user#discrim if it's non-0 otherwise just username.
GetUserMention will return a formatted user mention from an id.
HeadLinesLimit will take the first amount of lines that fit into the X char limit If the string does not consist of split lines, instead just fit the first amount of chars.
JoinInt64AndStr will join and add a plural s to the str if int is not 1, for example, "0 hours", "1 hour", "2 hours".
JoinInt64Slice will join i with sep.
JoinIntAndStr is a wrapper for JoinInt64AndStr.
No description provided by the author
No description provided by the author
ParseHexColorFast will take a hex string, and convert it to a color.RGBA.
No description provided by the author
RequestUrl will return the bytes of the body of url.
RequestUrlFn will execute fn on req, then return the bytes of the body of url.
RequestUrlReq will return the bytes of the body of request.
RequestUrlRetry will return the bytes of the body of the first successful url.
RetryFunc will re-try fn by n number of times, in addition to one regular try.
SliceContains will return if slice s contains e.
SliceEqual returns true if all bytes of a and b are the same.
SliceJoin will join any slice based on the property or value that c returns.
SliceRemove will remove m from s.
SliceRemoveIndex will remove index i from s.
SliceReverse will reverse the order of s.
SlicesCondition will return if all values of []T match condition c.
SliceSortAlphanumeric will sort a string slice alphanumerically.
TailLinesLimit will take the last amount of lines that fit into the X char limit.