Documentation ¶
Overview ¶
Package ctxext zb context 扩展
Index ¶
- func DoOnceOnSuccess[Ctx any](f func(Ctx) bool) func(Ctx) bool
- func JiebaSimilarity[Ctx any](sameper float64, seg *jieba.Segmenter, getmsg func(Ctx) string, src ...string) func(Ctx) bool
- func RandSenderPerDayN(uid int64, n int) int
- func ValueInList[Ctx any](getval func(Ctx) string, list ListGetter) func(Ctx) bool
- type ListGetter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DoOnceOnSuccess ¶
DoOnceOnSuccess 当返回 true, 之后直接通过, 否则下次触发仍会执行
func JiebaSimilarity ¶
func JiebaSimilarity[Ctx any](sameper float64, seg *jieba.Segmenter, getmsg func(Ctx) string, src ...string) func(Ctx) bool
JiebaSimilarity sameper from 0.0 to 1.0
func ValueInList ¶
func ValueInList[Ctx any](getval func(Ctx) string, list ListGetter) func(Ctx) bool
ValueInList 判断参数是否在列表中
Types ¶
Click to show internal directories.
Click to hide internal directories.