{"id":13494576,"url":"https://github.com/zc2638/go-standard","last_synced_at":"2026-01-23T02:14:52.197Z","repository":{"id":57517453,"uuid":"180800058","full_name":"zc2638/go-standard","owner":"zc2638","description":"Go常用规范定义，标准库方法使用示例，请注意这不是Go的中文版标准库(传送门)","archived":false,"fork":false,"pushed_at":"2023-11-07T02:49:27.000Z","size":3488,"stargazers_count":473,"open_issues_count":0,"forks_count":99,"subscribers_count":23,"default_branch":"main","last_synced_at":"2025-03-28T14:37:35.169Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zc2638.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2019-04-11T13:38:50.000Z","updated_at":"2025-02-28T04:30:27.000Z","dependencies_parsed_at":"2023-11-07T05:35:17.930Z","dependency_job_id":null,"html_url":"https://github.com/zc2638/go-standard","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zc2638/go-standard","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zc2638%2Fgo-standard","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zc2638%2Fgo-standard/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zc2638%2Fgo-standard/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zc2638%2Fgo-standard/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zc2638","download_url":"https://codeload.github.com/zc2638/go-standard/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zc2638%2Fgo-standard/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28677725,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-23T01:00:35.747Z","status":"online","status_checked_at":"2026-01-23T02:00:08.296Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T19:01:26.229Z","updated_at":"2026-01-23T02:14:52.174Z","avatar_url":"https://github.com/zc2638.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# go-standard\n\n![Go](https://raw.githubusercontent.com/zc2638/material/master/go/go.png)\n\nGo常用规范定义，标准库方法使用示例，请注意这不是Go的中文版标准库\n\n## [Golang 泛型](https://github.com/akutz/go-generics-the-hard-way)\n## [Golang 常见指令](./docs/instruction.md)\n## [Golang 插件](./docs/plugin.md)\n## [Uber编码规范](./docs/style.md)\n## \u003ca href=\"https://github.com/opentracing-contrib/opentracing-specification-zh/blob/master/specification.md\" target=\"_blank\"\u003eOpenTracing链路追踪规范\u003c/a\u003e\n\n## Go Module代理\n设置环境变量\n```\nGOPROXY=https://proxy.golang.org           # 官方推荐，国内还无法正常使用\nGOPROXY=https://mirrors.aliyun.com/goproxy # 阿里云\nGOPROXY=https://goproxy.cn                 # 国内相对友好\nGOPROXY=https://goproxy.io                 # 通用\n```\n\n## TODO\n- 改写为单元测试\n- 更新到 `1.21+` 版本\n\n## 简介\n\n- [**archive**](https://github.com/zc2638/go-standard/tree/master/src/archive) \u0026emsp;\u0026emsp;\u0026emsp;\u0026emsp; tar/zip压缩操作\n- [**bufio**](https://github.com/zc2638/go-standard/tree/master/src/bufio/example.go) \u0026emsp;\u0026emsp;\u0026emsp;\u0026emsp;\u0026emsp; 有缓冲的I/O\n- [**bytes**](https://github.com/zc2638/go-standard/tree/master/src/bytes/example.go) \u0026emsp;\u0026emsp;\u0026emsp;\u0026emsp;\u0026emsp; 操作[]byte字节片\n- [**compress**](https://github.com/zc2638/go-standard/tree/master/src/compress) \u0026emsp;\u0026emsp;\u0026emsp; bzip2/flate/gzip/lzw/zlib压缩操作\n- [**container**](https://github.com/zc2638/go-standard/tree/master/src/container) \u0026emsp;\u0026emsp;\u0026emsp;\u0026ensp;堆操作/双向链表/环形链表\n- [**context**](https://github.com/zc2638/go-standard/tree/master/src/context/example.go) \u0026emsp;\u0026emsp;\u0026emsp;\u0026emsp;\u0026nbsp;上下文类型\n- [**crypto**](https://github.com/zc2638/go-standard/tree/master/src/crypto) \u0026emsp;\u0026emsp;\u0026emsp;\u0026emsp;\u0026emsp;常用的密码（算法）\n- [**database/sql**](https://github.com/zc2638/go-standard/tree/master/src/database/sql/example.go) \u0026emsp;\u0026emsp;数据库接口\n- [**encoding**](https://github.com/zc2638/go-standard/tree/master/src/encoding) \u0026emsp;\u0026emsp;\u0026emsp;\u0026emsp;数据编码\n- [**errors**](https://github.com/zc2638/go-standard/tree/master/src/errors/example.go) \u0026emsp;\u0026emsp;\u0026emsp;\u0026emsp;\u0026emsp; 创建错误函数\n- [**expvar**](https://github.com/zc2638/go-standard/tree/master/src/expvar/example.go) \u0026emsp;\u0026emsp;\u0026emsp;\u0026emsp;\u0026emsp;公共变量\n- [**flag**](https://github.com/zc2638/go-standard/tree/master/src/flag/example.go) \u0026emsp;\u0026emsp;\u0026emsp;\u0026emsp;\u0026emsp;\u0026emsp;\u0026ensp;命令行参数解析\n- [**fmt**](https://github.com/zc2638/go-standard/tree/master/src/fmt/example.go) \u0026emsp;\u0026emsp;\u0026emsp;\u0026emsp;\u0026emsp;\u0026emsp;\u0026ensp; 格式化I/O\n- [**go**](https://github.com/zc2638/go-standard/tree/master/src/go/example.md) \u0026emsp;\u0026emsp;\u0026emsp;\u0026emsp;\u0026emsp;\u0026emsp;\u0026emsp;GO常用命令\n- [**hash**](https://github.com/zc2638/go-standard/tree/master/src/hash) \u0026emsp;\u0026emsp;\u0026emsp;\u0026emsp;\u0026emsp;\u0026emsp;提供hash函数的接口\n- [**html**](https://github.com/zc2638/go-standard/tree/master/src/html/example.go) \u0026emsp;\u0026emsp;\u0026emsp;\u0026emsp;\u0026emsp;\u0026emsp; 转义和解转义HTML文本\n- [**image**](https://github.com/zc2638/go-standard/tree/master/src/image/example.go) \u0026emsp;\u0026emsp;\u0026emsp;\u0026emsp;\u0026emsp;\u0026ensp;实现了基本的2D图片库\n- [**index/suffixarray**](https://github.com/zc2638/go-standard/tree/master/src/index/suffixarray/example.go) \u0026ensp;使用内存后缀数组以对数时间实现子字符串搜索\n- [**io**](https://github.com/zc2638/go-standard/tree/master/src/io/example.go) \u0026emsp;\u0026emsp;\u0026emsp;\u0026emsp;\u0026emsp;\u0026emsp;\u0026emsp;\u0026ensp; I/O操作\n- [**log**](https://github.com/zc2638/go-standard/tree/master/src/log) \u0026emsp;\u0026emsp;\u0026emsp;\u0026emsp;\u0026emsp;\u0026emsp;\u0026emsp;简单的日志服务\n- [**math**](https://github.com/zc2638/go-standard/tree/master/src/math) \u0026emsp;\u0026emsp;\u0026emsp;\u0026emsp;\u0026emsp;\u0026emsp;基本的数学常数和数学函数\n- [**mime**](https://github.com/zc2638/go-standard/tree/master/src/mime/example.go) \u0026emsp;\u0026emsp;\u0026emsp;\u0026emsp;\u0026emsp;\u0026emsp;实现了MIME的部分规定\n- [**net**](https://github.com/zc2638/go-standard/tree/master/src/net) \u0026emsp;\u0026emsp;\u0026emsp;\u0026emsp;\u0026emsp;\u0026emsp;\u0026emsp;提供了可移植的网络I/O接口，包括TCP/IP、UDP、域名解析和Unix域socket\n- [**os**](https://github.com/zc2638/go-standard/tree/master/src/os) \u0026emsp;\u0026emsp;\u0026emsp;\u0026emsp;\u0026emsp;\u0026emsp;\u0026emsp; 操作系统函数\n- [**path**](https://github.com/zc2638/go-standard/tree/master/src/path/example.go) \u0026emsp;\u0026emsp;\u0026emsp;\u0026emsp;\u0026emsp;\u0026emsp; 对斜杠分隔的路径的实用操作\n- [**plugin**](https://github.com/zc2638/go-standard/tree/master/src/plugin/example.go) \u0026emsp;\u0026emsp;\u0026emsp;\u0026emsp;\u0026emsp; 插件生成和加载\n- [**reflect**](https://github.com/zc2638/go-standard/tree/master/src/reflect/example.go) \u0026emsp;\u0026emsp;\u0026emsp;\u0026emsp;\u0026emsp; 反射操作任意类型对象\n- [**regexp**](https://github.com/zc2638/go-standard/tree/master/src/regexp/example.go) \u0026emsp;\u0026emsp;\u0026emsp;\u0026emsp;\u0026emsp;正则表达式\n- [**rutime**](https://github.com/zc2638/go-standard/tree/master/src/runtime) \u0026emsp;\u0026emsp;\u0026emsp;\u0026emsp;\u0026emsp;\u0026nbsp;提供和go运行时环境的互操作，如控制go程的函数\n- [**sort**](https://github.com/zc2638/go-standard/tree/master/src/sort/example.go) \u0026emsp;\u0026emsp;\u0026emsp;\u0026emsp;\u0026emsp;\u0026emsp;\u0026ensp;排序切片和用户自定义数据集\n- [**strconv**](https://github.com/zc2638/go-standard/tree/master/src/strconv/example.go) \u0026emsp;\u0026emsp;\u0026emsp;\u0026emsp;\u0026ensp; 基本数据类型和其字符串类型的相互转换\n- [**strings**](https://github.com/zc2638/go-standard/tree/master/src/strings/example.go) \u0026emsp;\u0026emsp;\u0026emsp;\u0026emsp;\u0026emsp;操作字符串\n- [**sync**](https://github.com/zc2638/go-standard/tree/master/src/sync) \u0026emsp;\u0026emsp;\u0026emsp;\u0026emsp;\u0026emsp;\u0026emsp;提供了基本的同步基元，如互斥锁\n- [**text**](https://github.com/zc2638/go-standard/tree/master/src/text) \u0026emsp;\u0026emsp;\u0026emsp;\u0026emsp;\u0026emsp;\u0026emsp;\u0026ensp;文本操作\n- [**time**](https://github.com/zc2638/go-standard/tree/master/src/time/example.go) \u0026emsp;\u0026emsp;\u0026emsp;\u0026emsp;\u0026emsp;\u0026emsp; 时间操作\n- [**unicode**](https://github.com/zc2638/go-standard/tree/master/src/unicode) \u0026emsp;\u0026emsp;\u0026emsp;\u0026emsp;\u0026ensp;unicode操作\n- [**unsafe**](https://github.com/zc2638/go-standard/tree/master/src/unsafe/example.go) \u0026emsp;\u0026emsp;\u0026emsp;\u0026emsp;\u0026emsp;提供了一些跳过go语言类型安全限制的操作\n\n### Tip\nchannel作为参数\n```go\nchan int   // 可读可写\n\u003c-chan int // 只读\nchan\u003c- int // 只写\n```\n\n### JetBrains 开源证书支持\n\n`go-standard` 项目一直以来都是在 JetBrains 公司旗下的 GoLand 集成开发环境中进行开发，基于 **free JetBrains Open Source license(s)** 正版免费授权，在此表达谢意。\n\n\u003ca href=\"https://www.jetbrains.com/?from=go-standard\" target=\"_blank\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/zc2638/material/master/jetbrains/jetbrains.png\" width=\"250\" align=\"middle\"/\u003e\u003c/a\u003e\n\n\n### 参考\n\n- [**中文版标准库文档**](https://studygolang.com/pkgdoc) | [**中文版标准库文档2**](http://www.php.cn/manual/view/35126.html)\n- [**中文版标准库文档(Dash版)**](https://github.com/taigacute/GoDoc-CN)\n- [**《Go入门指南》**](https://github.com/unknwon/the-way-to-go_ZH_CN)\n- [**Mastering Go(玩转Go中文译本)**](https://github.com/hantmac/Mastering_Go_ZH_CN)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzc2638%2Fgo-standard","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzc2638%2Fgo-standard","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzc2638%2Fgo-standard/lists"}