Directories ¶
Path | Synopsis |
---|---|
api
|
|
baidu
百度客户端 https://ai.baidu.com/ai-doc
|
百度客户端 https://ai.baidu.com/ai-doc |
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 |
github
https://docs.github.com/en
|
https://docs.github.com/en |
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 |
lib
|
|
ali/captcha
交互流程 https://help.aliyun.com/zh/captcha/captcha2-0/product-overview/what-is-alibaba-cloud-captcha-2 接入流程 https://help.aliyun.com/zh/captcha/captcha2-0/user-guide/access-guidelines
|
交互流程 https://help.aliyun.com/zh/captcha/captcha2-0/product-overview/what-is-alibaba-cloud-captcha-2 接入流程 https://help.aliyun.com/zh/captcha/captcha2-0/user-guide/access-guidelines |
ali/oss
权限控制 https://help.aliyun.com/zh/oss/developer-reference/access-control-1/
|
权限控制 https://help.aliyun.com/zh/oss/developer-reference/access-control-1/ |
ali/ram
访问控制 https://help.aliyun.com/zh/ram/ https://help.aliyun.com/zh/ram/developer-reference/sts-sdk-overview
|
访问控制 https://help.aliyun.com/zh/ram/ https://help.aliyun.com/zh/ram/developer-reference/sts-sdk-overview |
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/ |
cobra
https://github.com/spf13/cobra/blob/main/site/content/user_guide.md Commands represent actions, Args are things and Flags are modifiers for those actions.
|
https://github.com/spf13/cobra/blob/main/site/content/user_guide.md Commands represent actions, Args are things and Flags are modifiers for those actions. |
cron
定时调度器,必须先调用Init()初始化
|
定时调度器,必须先调用Init()初始化 |
exl
excel结构体绑定
|
excel结构体绑定 |
fastjson
无需声明,直接获取json字段值 fastjson parses the input JSON only once.
|
无需声明,直接获取json字段值 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 Code generated by swaggo/swag.
|
Package docs Code 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
随机生成
|
随机生成 |
goquery
使用css选择器
|
使用css选择器 |
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/ 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/ https://grpc.io/docs/languages/go/ https://github.com/grpc/grpc-go/tree/master/Documentation https://github.com/grpc/grpc-go/tree/master/examples |
ip2locationio
https://ip2location-io-go.readthedocs.io/en/latest/
|
https://ip2location-io-go.readthedocs.io/en/latest/ |
json
Fast JSON encoder/decoder compatible with encoding/json for Go
|
Fast JSON encoder/decoder compatible with encoding/json for Go |
jsoniter
100% compatibility with standard lib
|
100% compatibility with standard lib |
jwt
https://golang-jwt.github.io/jwt/ 内部使用 base64.RawURLEncoding.EncodeToString,没有padding
|
https://golang-jwt.github.io/jwt/ 内部使用 base64.RawURLEncoding.EncodeToString,没有padding |
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/ |
req
https://req.cool/
|
https://req.cool/ |
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 初始化 |
sprig
模板函数列表 https://masterminds.github.io/sprig/
|
模板函数列表 https://masterminds.github.io/sprig/ |
swag
https://github.com/swaggo/swag go install github.com/swaggo/swag/cmd/swag@latest swag init swaggertype 结构体标签 swaggerignore 结构体标签
|
https://github.com/swaggo/swag go install github.com/swaggo/swag/cmd/swag@latest swag init swaggertype 结构体标签 swaggerignore 结构体标签 |
temporal
封装 temporal 客户端 必须先调用 Init 初始化客户端,才能调用其它函数
|
封装 temporal 客户端 必须先调用 Init 初始化客户端,才能调用其它函数 |
toml
json toml 互转 go install github.com/pelletier/go-toml/v2/cmd/tomljson@latest go install github.com/pelletier/go-toml/v2/cmd/jsontoml@latest
|
json toml 互转 go install github.com/pelletier/go-toml/v2/cmd/tomljson@latest go install github.com/pelletier/go-toml/v2/cmd/jsontoml@latest |
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} |
pkg
|
|
ald
LRU Least Recently Used
|
LRU Least Recently Used |
crypto/sign
api签名 - 科大讯飞 https://www.xfyun.cn/doc/asr/ifasr_new/API.html
|
api签名 - 科大讯飞 https://www.xfyun.cn/doc/asr/ifasr_new/API.html |
crypto/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/微型加密算法 |
design
状态模式 https://refactoringguru.cn/design-patterns/state/go/example 该模式将与状态相关的行为抽取到独立的状态类中
|
状态模式 https://refactoringguru.cn/design-patterns/state/go/example 该模式将与状态相关的行为抽取到独立的状态类中 |
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 |
media/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 |
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
|
|
crypto/aes
https://gist.github.com/hothero/7d085573f5cb7cdb5801d7adcf66dcf3
|
https://gist.github.com/hothero/7d085573f5cb7cdb5801d7adcf66dcf3 |
crypto/sha256
摘要是32个字节
|
摘要是32个字节 |
csv
csv文件处理 字段可以用""包裹,""内可以换行,也可以使用""表示单个"
|
csv文件处理 字段可以用""包裹,""内可以换行,也可以使用""表示单个" |
errors
An error e wraps another error if e's type has one of the methods Unwrap() error Unwrap() []error
|
An error e wraps another error if e's type has one of the methods Unwrap() error Unwrap() []error |
fmt
实现 error 或 fmt.Stringer 接口,会先转为字符串 打印时优先调用error.Error() 然后调用fmt.Stringer.String()
|
实现 error 或 fmt.Stringer 接口,会先转为字符串 打印时优先调用error.Error() 然后调用fmt.Stringer.String() |
mime
https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types
|
https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types |
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 |
syscall
windows系统调用
|
windows系统调用 |
template
Templates are executed by applying them to a data structure.
|
Templates are executed by applying them to a data structure. |
time
https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
|
https://en.wikipedia.org/wiki/List_of_tz_database_time_zones |
sub
|
|
publicsuffix
A public suffix is one under which Internet users can directly register names.
|
A public suffix is one under which Internet users can directly register names. |
tools
|
|
docker/examples
打印k8s集群资源信息 cd tools/docker/examples
|
打印k8s集群资源信息 cd tools/docker/examples |
Click to show internal directories.
Click to hide internal directories.