Directories ¶
Path | Synopsis |
---|---|
二叉树 每个节点最多有两个子节点 https://en.wikipedia.org/wiki/Binary_tree
|
二叉树 每个节点最多有两个子节点 https://en.wikipedia.org/wiki/Binary_tree |
api
|
|
ding
钉钉 https://open.dingtalk.com/document/orgapp/learning-map https://open.dingtalk.com/document/orgapp/robot-overview
|
钉钉 https://open.dingtalk.com/document/orgapp/learning-map https://open.dingtalk.com/document/orgapp/robot-overview |
ip
ip信息api
|
ip信息api |
xfyun
科大讯飞api客户端 如果不使用 NewXfyun,必须先 Init 初始化 不同服务的密钥不同 https://www.xfyun.cn/doc/ https://www.xfyun.cn/document/error-code 错误码查询
|
科大讯飞api客户端 如果不使用 NewXfyun,必须先 Init 初始化 不同服务的密钥不同 https://www.xfyun.cn/doc/ https://www.xfyun.cn/document/error-code 错误码查询 |
xfyun/asr
语音转写 Long Form Automatic Speech Recognition 如果不使用 NewXfyun,必须先 SetLfAsrSecret 设置语音转写密钥 上传音视频文件,可以设置处理结果回调,再调用结果查询接口 https://www.xfyun.cn/doc/asr/ifasr_new/API.html
|
语音转写 Long Form Automatic Speech Recognition 如果不使用 NewXfyun,必须先 SetLfAsrSecret 设置语音转写密钥 上传音视频文件,可以设置处理结果回调,再调用结果查询接口 https://www.xfyun.cn/doc/asr/ifasr_new/API.html |
xfyun/trans
机器翻译 如果不使用 NewXfyun,必须先 SetTransSecret 设置密钥 https://www.xfyun.cn/doc/nlp/niutrans/API.html
|
机器翻译 如果不使用 NewXfyun,必须先 SetTransSecret 设置密钥 https://www.xfyun.cn/doc/nlp/niutrans/API.html |
xfyun/tts
语音合成 https://www.xfyun.cn/doc/tts/online_tts/API.html
|
语音合成 https://www.xfyun.cn/doc/tts/online_tts/API.html |
crypto
|
|
sign
api签名 - 科大讯飞 https://www.xfyun.cn/doc/asr/ifasr_new/API.html
|
api签名 - 科大讯飞 https://www.xfyun.cn/doc/asr/ifasr_new/API.html |
tea
tea加密 密文为16进制字符串,每次加密得到的密文都不相同 明文越长,密文越长 https://baike.baidu.com/item/TEA加密算法 https://zh.wikipedia.org/zh-hans/微型加密算法
|
tea加密 密文为16进制字符串,每次加密得到的密文都不相同 明文越长,密文越长 https://baike.baidu.com/item/TEA加密算法 https://zh.wikipedia.org/zh-hans/微型加密算法 |
lib
|
|
ali/oss
权限控制 https://help.aliyun.com/document_detail/609913.html
|
权限控制 https://help.aliyun.com/document_detail/609913.html |
ali/ram
访问控制 https://help.aliyun.com/product/28625.html https://help.aliyun.com/document_detail/121136.html
|
访问控制 https://help.aliyun.com/product/28625.html https://help.aliyun.com/document_detail/121136.html |
aws
https://docs.aws.amazon.com/sdk-for-go/ https://github.com/awsdocs/aws-doc-sdk-examples/tree/main/gov2
|
https://docs.aws.amazon.com/sdk-for-go/ https://github.com/awsdocs/aws-doc-sdk-examples/tree/main/gov2 |
aws/s3
https://aws.amazon.com/cn/s3/ https://docs.aws.amazon.com/s3/
|
https://aws.amazon.com/cn/s3/ https://docs.aws.amazon.com/s3/ |
cron
┌───────────── minute (0 - 59) │ ┌───────────── hour (0 - 23) │ │ ┌───────────── day of the month (1 - 31) │ │ │ ┌───────────── month (1 - 12) │ │ │ │ ┌───────────── day of the week (0 - 6) (Sunday to Saturday; │ │ │ │ │ 7 is also Sunday on some systems) │ │ │ │ │ │ │ │ │ │ * * * * * <command to execute>
|
┌───────────── minute (0 - 59) │ ┌───────────── hour (0 - 23) │ │ ┌───────────── day of the month (1 - 31) │ │ │ ┌───────────── month (1 - 12) │ │ │ │ ┌───────────── day of the week (0 - 6) (Sunday to Saturday; │ │ │ │ │ 7 is also Sunday on some systems) │ │ │ │ │ │ │ │ │ │ * * * * * <command to execute> |
exl
excel结构体绑定
|
excel结构体绑定 |
fastjson
无需声明,直接获取json字段值 https://pkg.go.dev/github.com/valyala/fastjson fastjson parses the input JSON only once.
|
无需声明,直接获取json字段值 https://pkg.go.dev/github.com/valyala/fastjson fastjson parses the input JSON only once. |
gin
https://github.com/gin-gonic/gin/blob/master/docs/doc.md https://gin-gonic.com/docs/examples/ https://github.com/gin-gonic/examples
|
https://github.com/gin-gonic/gin/blob/master/docs/doc.md https://gin-gonic.com/docs/examples/ https://github.com/gin-gonic/examples |
gin/examples/docs
Package docs GENERATED BY SWAG; DO NOT EDIT This file was generated by swaggo/swag
|
Package docs GENERATED BY SWAG; DO NOT EDIT This file was generated by swaggo/swag |
glog
flag.Parse must be called before any logging is done.
|
flag.Parse must be called before any logging is done. |
gofakeit
随机生成
|
随机生成 |
gorm
插入操作 https://gorm.io/docs/create.html
|
插入操作 https://gorm.io/docs/create.html |
gorm/logger
开放gorm.io/gorm/logger包的logger
|
开放gorm.io/gorm/logger包的logger |
grpc
https://grpc.io/docs/languages/go/ https://github.com/grpc/grpc-go/tree/master/Documentation https://github.com/grpc/grpc-go/tree/master/examples
|
https://grpc.io/docs/languages/go/ https://github.com/grpc/grpc-go/tree/master/Documentation https://github.com/grpc/grpc-go/tree/master/examples |
json
Fast JSON encoder/decoder compatible with encoding/json for Go
|
Fast JSON encoder/decoder compatible with encoding/json for Go |
k8s
k8s客户端,必须先初始化 NewForFile 集群外客户端初始化 NewInCluster 集群内客户端初始化 https://github.com/kubernetes/client-go/blob/master/INSTALL.md https://github.com/kubernetes/client-go/tree/master/examples
|
k8s客户端,必须先初始化 NewForFile 集群外客户端初始化 NewInCluster 集群内客户端初始化 https://github.com/kubernetes/client-go/blob/master/INSTALL.md https://github.com/kubernetes/client-go/tree/master/examples |
k8s/examples
集群内客户端 https://github.com/kubernetes/client-go/tree/master/examples/in-cluster-client-configuration
|
集群内客户端 https://github.com/kubernetes/client-go/tree/master/examples/in-cluster-client-configuration |
mapstructure
当json解码到any接口时,接口实际类型对应关系 map[string]interface{}, for JSON objects https://pkg.go.dev/encoding/json#Unmarshal
|
当json解码到any接口时,接口实际类型对应关系 map[string]interface{}, for JSON objects https://pkg.go.dev/encoding/json#Unmarshal |
nsq
示例 https://github.com/nsqio/nsq/tree/master/apps
|
示例 https://github.com/nsqio/nsq/tree/master/apps |
otel
参考SigNoz文档 https://signoz.io/docs/instrumentation/golang/
|
参考SigNoz文档 https://signoz.io/docs/instrumentation/golang/ |
prometheus
https://prometheus.io/docs/guides/go-application/ https://github.com/prometheus/client_golang/tree/main/examples
|
https://prometheus.io/docs/guides/go-application/ https://github.com/prometheus/client_golang/tree/main/examples |
redis
https://redis.uptrace.dev/guide/ 封装 redis 客户端,基于命令封装第三方库 必须先调用 Init 进行初始化
|
https://redis.uptrace.dev/guide/ 封装 redis 客户端,基于命令封装第三方库 必须先调用 Init 进行初始化 |
redsync
Redis-based distributed mutual exclusion lock https://redis.io/docs/manual/patterns/distributed-locks/
|
Redis-based distributed mutual exclusion lock https://redis.io/docs/manual/patterns/distributed-locks/ |
resty
非200响应码会正常返回响应,不会返回错误
|
非200响应码会正常返回响应,不会返回错误 |
sarama
https://github.com/Shopify/sarama/tree/main/examples/sasl_scram_client
|
https://github.com/Shopify/sarama/tree/main/examples/sasl_scram_client |
sonyflake
sonyflake 分布式唯一id生成器 必须先调用 Init 初始化
|
sonyflake 分布式唯一id生成器 必须先调用 Init 初始化 |
swag
https://github.com/swaggo/swag go install github.com/swaggo/swag/cmd/swag@latest swag init
|
https://github.com/swaggo/swag go install github.com/swaggo/swag/cmd/swag@latest swag init |
temporal
封装 temporal 客户端 必须先调用 Init 初始化客户端,才能调用其它函数
|
封装 temporal 客户端 必须先调用 Init 初始化客户端,才能调用其它函数 |
ws
websocket https://www.rfc-editor.org/rfc/rfc6455 https://github.com/gobwas/ws-examples
|
websocket https://www.rfc-editor.org/rfc/rfc6455 https://github.com/gobwas/ws-examples |
wsg
Connections support one concurrent reader and one concurrent writer.
|
Connections support one concurrent reader and one concurrent writer. |
wsn
https://github.com/nhooyr/websocket/tree/master/examples
|
https://github.com/nhooyr/websocket/tree/master/examples |
zap
zap好像比logrus块 zap必须要初始化
|
zap好像比logrus块 zap必须要初始化 |
zero
配置 直接从环境变量读取 `json:",env=SERVICE_NAME"` 或者配置yaml文件 ${SERVICE_NAME}
|
配置 直接从环境变量读取 `json:",env=SERVICE_NAME"` 或者配置yaml文件 ${SERVICE_NAME} |
media
|
|
rtmp
rtmp服务 https://en.wikipedia.org/wiki/Real-Time_Messaging_Protocol https://web.archive.org/web/20140821210116/https://wwwimages2.adobe.com/content/dam/Adobe/en/devnet/rtmp/pdf/rtmp_specification_1.0.pdf
|
rtmp服务 https://en.wikipedia.org/wiki/Real-Time_Messaging_Protocol https://web.archive.org/web/20140821210116/https://wwwimages2.adobe.com/content/dam/Adobe/en/devnet/rtmp/pdf/rtmp_specification_1.0.pdf |
srt
读写srt字幕文件 https://docs.fileformat.com/zh/video/srt/ https://github.com/wargarblgarbl/libgosubs/tree/master/srt
|
读写srt字幕文件 https://docs.fileformat.com/zh/video/srt/ https://github.com/wargarblgarbl/libgosubs/tree/master/srt |
misc
|
|
spec
|
|
types
Sending to or closing a closed channel causes a run-time panic.
|
Sending to or closing a closed channel causes a run-time panic. |
std
|
|
aes
https://gist.github.com/hothero/7d085573f5cb7cdb5801d7adcf66dcf3
|
https://gist.github.com/hothero/7d085573f5cb7cdb5801d7adcf66dcf3 |
csv
csv文件处理 字段可以用""包裹,""内可以换行,也可以使用""表示单个"
|
csv文件处理 字段可以用""包裹,""内可以换行,也可以使用""表示单个" |
fmt
实现 error 或 fmt.Stringer 接口,会使 %+v 失效
|
实现 error 或 fmt.Stringer 接口,会使 %+v 失效 |
mime
https://www.iana.org/assignments/media-types/media-types.xhtml
|
https://www.iana.org/assignments/media-types/media-types.xhtml |
net
网卡
|
网卡 |
regexp
More precisely, it is the syntax accepted by RE2 and described at https://golang.org/s/re2syntax, except for \C. go doc regexp/syntax
|
More precisely, it is the syntax accepted by RE2 and described at https://golang.org/s/re2syntax, except for \C. go doc regexp/syntax |
sha256
摘要是32个字节
|
摘要是32个字节 |
syscall
windows系统调用
|
windows系统调用 |
time
https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
|
https://en.wikipedia.org/wiki/List_of_tz_database_time_zones |
sub
|
|
tools
|
|
docker/resource-info
打印k8s集群资源信息 cd tools/docker/resource-info set GOOS=linux&set CGO_ENABLED=0&go build -o app .
|
打印k8s集群资源信息 cd tools/docker/resource-info set GOOS=linux&set CGO_ENABLED=0&go build -o app . |
Click to show internal directories.
Click to hide internal directories.