Documentation
¶
Index ¶
- func BitClear[T Int](val T, position int) T
- func BitSet[T Int](val T, position int) T
- func Equal(obj any, target any, targets ...any) bool
- func FormatGroupRoomID(groupID int64) string
- func FormatPrivateRoomID(userAID, userBID int64) string
- func FormatWorldRoomID(worldID int64) string
- func GetClientIP(r *http.Request) (string, error)
- func GetHostname() string
- func GetLocalIP() string
- func GetLocalIPs() []string
- func In(obj any, target any, targets ...any) bool
- func IntBetween[T Int](dest, from, to T) bool
- func IntLen[T Int](val T) int
- func IsNil(v any) bool
- func MD5(src []byte) []byte
- func MD5String(src string) string
- func PasswordHash(pwd string) string
- func SliceUnique(data any, dst any) error
- func SortInt[T Int](a T, b T) (T, T)
- func StringCut(data string, limit int) string
- func StringLen(data string) int
- func UUID() string
- type Int
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Equal ¶
Equal 判断target跟targets内的所有项与val是否相等,如果全部target都与val相等 如果obj与target跟targets里面的所有数据都相等,则返回true,如果有其中一项不相等,则返回false
func FormatPrivateRoomID ¶
FormatPrivateRoomID 格式化私人聊天室房间号
func FormatWorldRoomID ¶ added in v1.0.3
FormatWorldRoomID 格式化世界聊天室房间号
func GetLocalIPs ¶ added in v1.0.5
func GetLocalIPs() []string
func In ¶
In 判断obj是否与target或者targets内的某个元素相等 如果 obj 等于 target 或者等于 targets 其中一项,则返回true 如果没匹配到其中一项,则返回false
func IntBetween ¶
IntBetween dest在指定范围内 是一个闭区间 from <= dest <= to
Types ¶
Click to show internal directories.
Click to hide internal directories.