Versions in this module Expand all Collapse all v1 v1.0.0 Oct 4, 2026 Changes in this version + func F取POST参数(r *http.Request, 参数名 string) string + func F取查询参数(r *http.Request, 参数名 string) string + func F响应HTML(w http.ResponseWriter, 状态码 int, html string) + func F响应JSON(w http.ResponseWriter, 状态码 int, 数据 interface{}) + func F响应文本(w http.ResponseWriter, 状态码 int, 文本 string) + func F解析JSON请求体(r *http.Request, 目标 interface{}) error + type L_HTTP服务端 struct + func (s *L_HTTP服务端) J静态文件服务(URL前缀 string, 本地目录 string) + func (s *L_HTTP服务端) Q取启动地址() string + func (s *L_HTTP服务端) Q启动(端口 int) error + func (s *L_HTTP服务端) Q启动带地址(地址 string) error + func (s *L_HTTP服务端) S是否运行中() bool + func (s *L_HTTP服务端) T停止() error + func (s *L_HTTP服务端) T注册路由(方法 string, 路径 string, 处理函数 http.HandlerFunc) + func (s *L_HTTP服务端) T注册通用路由(路径 string, 处理函数 http.HandlerFunc) + func (s *L_HTTP服务端) Z中间件(中间件函数 func(http.HandlerFunc) http.HandlerFunc) + func (s *L_HTTP服务端) Z中间件CORS() + func (s *L_HTTP服务端) Z中间件日志() + type L_TCP客户端 struct + D断开回调 func() + S收到数据回调 func(数据 []byte) + func (c *L_TCP客户端) D断开() + func (c *L_TCP客户端) F发送数据(数据 []byte) error + func (c *L_TCP客户端) F发送文本(文本 string) error + func (c *L_TCP客户端) L连接(地址 string) error + func (c *L_TCP客户端) Q取本地地址() string + func (c *L_TCP客户端) S是否已连接() bool + type L_TCP服务端 struct + K客户端断开回调 func(客户端地址 string) + K客户端连接回调 func(客户端地址 string) + S收到数据回调 func(客户端地址 string, 数据 []byte) + func (s *L_TCP服务端) F发送数据(客户端地址 string, 数据 []byte) error + func (s *L_TCP服务端) F发送文本(客户端地址 string, 文本 string) error + func (s *L_TCP服务端) G广播数据(数据 []byte) + func (s *L_TCP服务端) G广播文本(文本 string) + func (s *L_TCP服务端) Q取客户端列表() []string + func (s *L_TCP服务端) Q取客户端数量() int + func (s *L_TCP服务端) Q启动(端口 int) error + func (s *L_TCP服务端) T停止() + type L_WS客户端 struct + D断开回调 func() + S收到字节回调 func(数据 []byte) + S收到文本回调 func(文本 string) + func (c *L_WS客户端) D断开() + func (c *L_WS客户端) F发送JSON(数据 interface{}) error + func (c *L_WS客户端) F发送字节(数据 []byte) error + func (c *L_WS客户端) F发送文本(文本 string) error + func (c *L_WS客户端) L连接(URL string) error + func (c *L_WS客户端) Q取远程地址() string + func (c *L_WS客户端) S是否已连接() bool + type L_WS服务端 struct + K客户端断开回调 func(客户端ID string) + K客户端连接回调 func(客户端ID string) + S收到字节回调 func(客户端ID string, 数据 []byte) + S收到文本回调 func(客户端ID string, 文本 string) + func (s *L_WS服务端) F发送字节(客户端ID string, 数据 []byte) error + func (s *L_WS服务端) F发送文本(客户端ID string, 文本 string) error + func (s *L_WS服务端) G广播字节(数据 []byte) + func (s *L_WS服务端) G广播文本(文本 string) + func (s *L_WS服务端) Q取客户端列表() []string + func (s *L_WS服务端) Q取客户端数量() int + func (s *L_WS服务端) Q启动(端口 int, 路径 string) error + func (s *L_WS服务端) Q启动带地址(地址 string, 路径 string) error + func (s *L_WS服务端) T停止() + type L_临界许可 struct + func (l *L_临界许可) C尝试进入() bool + func (l *L_临界许可) J进入许可区() + func (l *L_临界许可) T退出许可区() + type L_正则表达式 struct + Count int + SubmatchCount2 int + func New正则表达式类(正则表达式文本 string, 被搜索的文本 string) (*L_正则表达式, bool) + func (this *L_正则表达式) E创建(正则表达式文本 string, 被搜索的文本 string) bool + func (this *L_正则表达式) GetResult() [][]string + func (this *L_正则表达式) Q取匹配数量() int + func (this *L_正则表达式) Q取匹配文本(匹配索引 int) string + func (this *L_正则表达式) Q取子匹配数量() int + func (this *L_正则表达式) Q取子匹配文本(匹配索引 int, 子表达式索引 int) string + type L_读写锁 struct + func (l *L_读写锁) J结束写() + func (l *L_读写锁) J结束读() + func (l *L_读写锁) K开始写() + func (l *L_读写锁) K开始读() + type L_队列 struct + func (j *L_队列) Init() + func (q *L_队列) Dump() + func (q *L_队列) J加入队列(v interface{}) int + func (q *L_队列) Q取队列长度() int + func (q *L_队列) Q清空队列() interface{} + func (q *L_队列) T弹出队列() (interface{}, bool) + func (q *L_队列) T弹出队列整数(值 *int) bool + func (q *L_队列) T弹出队列文本(值 *string) bool + type L_队列泛型 struct + func (q *L_队列泛型[T]) Dump() + func (q *L_队列泛型[T]) Init() + func (q *L_队列泛型[T]) J加入队列(v T) int + func (q *L_队列泛型[T]) Q取队列长度() int + func (q *L_队列泛型[T]) Q清空队列() + func (q *L_队列泛型[T]) T弹出队列() (T, bool)