Documentation ¶
Index ¶
- Constants
- func DateNumber() string
- func EscapeHtml(value string) string
- func FormatDatetime(timestamp int64) string
- func GenerateId() string
- func IsDateFormat(date string) bool
- func Location() *time.Location
- func NewMsgId() string
- func ParseHtmlImage(text string) string
- func ParseHtmlImageAll(text string) []string
- func ParseIds(str string) []int
- func ReplaceImgAll(value string) string
- func Retry(num int, sleep time.Duration, fn func() error) error
- func ToMap[T any, K int | string](arr []T, fn func(T) K) map[K]T
- func Unique[T IntInterface | string](data []T) []T
- type IntInterface
- type RoundRobin
Constants ¶
View Source
const (
DateDayFormat = "20060102"
)
Variables ¶
This section is empty.
Functions ¶
func DateNumber ¶ added in v1.1.0
func DateNumber() string
func EscapeHtml ¶
func FormatDatetime ¶ added in v1.1.0
func GenerateId ¶
func GenerateId() string
func IsDateFormat ¶ added in v1.1.0
func ReplaceImgAll ¶
Types ¶
type IntInterface ¶
type RoundRobin ¶
type RoundRobin struct {
CurIndex int
}
func (*RoundRobin) RoundRobin ¶
func (roundRobin *RoundRobin) RoundRobin(values []string) (value string)
轮询模式
Click to show internal directories.
Click to hide internal directories.