Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/zc2638/go-standard
Go常用规范定义,标准库方法使用示例,请注意这不是Go的中文版标准库(传送门)
https://github.com/zc2638/go-standard
Last synced: 3 months ago
JSON representation
Go常用规范定义,标准库方法使用示例,请注意这不是Go的中文版标准库(传送门)
- Host: GitHub
- URL: https://github.com/zc2638/go-standard
- Owner: zc2638
- License: apache-2.0
- Created: 2019-04-11T13:38:50.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2023-11-07T02:49:27.000Z (8 months ago)
- Last Synced: 2023-11-07T05:26:47.675Z (8 months ago)
- Language: Go
- Homepage:
- Size: 3.33 MB
- Stars: 455
- Watchers: 24
- Forks: 95
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Lists
- awesome-stars - zc2638/go-standard - Go常用规范定义,标准库方法使用示例,请注意这不是Go的中文版标准库(传送门) (Go)
README
# go-standard
![Go](https://raw.githubusercontent.com/zc2638/material/master/go/go.png)
Go常用规范定义,标准库方法使用示例,请注意这不是Go的中文版标准库
## [Golang 泛型](https://github.com/akutz/go-generics-the-hard-way)
## [Golang 常见指令](./docs/instruction.md)
## [Golang 插件](./docs/plugin.md)
## [Uber编码规范](./docs/style.md)
## OpenTracing链路追踪规范## Go Module代理
设置环境变量
```
GOPROXY=https://proxy.golang.org # 官方推荐,国内还无法正常使用
GOPROXY=https://mirrors.aliyun.com/goproxy # 阿里云
GOPROXY=https://goproxy.cn # 国内相对友好
GOPROXY=https://goproxy.io # 通用
```## TODO
- 改写为单元测试
- 更新到 `1.21+` 版本## 简介
- [**archive**](https://github.com/zc2638/go-standard/tree/master/src/archive) tar/zip压缩操作
- [**bufio**](https://github.com/zc2638/go-standard/tree/master/src/bufio/example.go) 有缓冲的I/O
- [**bytes**](https://github.com/zc2638/go-standard/tree/master/src/bytes/example.go) 操作[]byte字节片
- [**compress**](https://github.com/zc2638/go-standard/tree/master/src/compress) bzip2/flate/gzip/lzw/zlib压缩操作
- [**container**](https://github.com/zc2638/go-standard/tree/master/src/container) 堆操作/双向链表/环形链表
- [**context**](https://github.com/zc2638/go-standard/tree/master/src/context/example.go) 上下文类型
- [**crypto**](https://github.com/zc2638/go-standard/tree/master/src/crypto) 常用的密码(算法)
- [**database/sql**](https://github.com/zc2638/go-standard/tree/master/src/database/sql/example.go) 数据库接口
- [**encoding**](https://github.com/zc2638/go-standard/tree/master/src/encoding) 数据编码
- [**errors**](https://github.com/zc2638/go-standard/tree/master/src/errors/example.go) 创建错误函数
- [**expvar**](https://github.com/zc2638/go-standard/tree/master/src/expvar/example.go) 公共变量
- [**flag**](https://github.com/zc2638/go-standard/tree/master/src/flag/example.go) 命令行参数解析
- [**fmt**](https://github.com/zc2638/go-standard/tree/master/src/fmt/example.go) 格式化I/O
- [**go**](https://github.com/zc2638/go-standard/tree/master/src/go/example.md) GO常用命令
- [**hash**](https://github.com/zc2638/go-standard/tree/master/src/hash) 提供hash函数的接口
- [**html**](https://github.com/zc2638/go-standard/tree/master/src/html/example.go) 转义和解转义HTML文本
- [**image**](https://github.com/zc2638/go-standard/tree/master/src/image/example.go) 实现了基本的2D图片库
- [**index/suffixarray**](https://github.com/zc2638/go-standard/tree/master/src/index/suffixarray/example.go) 使用内存后缀数组以对数时间实现子字符串搜索
- [**io**](https://github.com/zc2638/go-standard/tree/master/src/io/example.go) I/O操作
- [**log**](https://github.com/zc2638/go-standard/tree/master/src/log) 简单的日志服务
- [**math**](https://github.com/zc2638/go-standard/tree/master/src/math) 基本的数学常数和数学函数
- [**mime**](https://github.com/zc2638/go-standard/tree/master/src/mime/example.go) 实现了MIME的部分规定
- [**net**](https://github.com/zc2638/go-standard/tree/master/src/net) 提供了可移植的网络I/O接口,包括TCP/IP、UDP、域名解析和Unix域socket
- [**os**](https://github.com/zc2638/go-standard/tree/master/src/os) 操作系统函数
- [**path**](https://github.com/zc2638/go-standard/tree/master/src/path/example.go) 对斜杠分隔的路径的实用操作
- [**plugin**](https://github.com/zc2638/go-standard/tree/master/src/plugin/example.go) 插件生成和加载
- [**reflect**](https://github.com/zc2638/go-standard/tree/master/src/reflect/example.go) 反射操作任意类型对象
- [**regexp**](https://github.com/zc2638/go-standard/tree/master/src/regexp/example.go) 正则表达式
- [**rutime**](https://github.com/zc2638/go-standard/tree/master/src/runtime) 提供和go运行时环境的互操作,如控制go程的函数
- [**sort**](https://github.com/zc2638/go-standard/tree/master/src/sort/example.go) 排序切片和用户自定义数据集
- [**strconv**](https://github.com/zc2638/go-standard/tree/master/src/strconv/example.go) 基本数据类型和其字符串类型的相互转换
- [**strings**](https://github.com/zc2638/go-standard/tree/master/src/strings/example.go) 操作字符串
- [**sync**](https://github.com/zc2638/go-standard/tree/master/src/sync) 提供了基本的同步基元,如互斥锁
- [**text**](https://github.com/zc2638/go-standard/tree/master/src/text) 文本操作
- [**time**](https://github.com/zc2638/go-standard/tree/master/src/time/example.go) 时间操作
- [**unicode**](https://github.com/zc2638/go-standard/tree/master/src/unicode) unicode操作
- [**unsafe**](https://github.com/zc2638/go-standard/tree/master/src/unsafe/example.go) 提供了一些跳过go语言类型安全限制的操作### Tip
channel作为参数
```go
chan int // 可读可写
<-chan int // 只读
chan<- int // 只写
```### JetBrains 开源证书支持
`go-standard` 项目一直以来都是在 JetBrains 公司旗下的 GoLand 集成开发环境中进行开发,基于 **free JetBrains Open Source license(s)** 正版免费授权,在此表达谢意。
### 参考
- [**中文版标准库文档**](https://studygolang.com/pkgdoc) | [**中文版标准库文档2**](http://www.php.cn/manual/view/35126.html)
- [**中文版标准库文档(Dash版)**](https://github.com/taigacute/GoDoc-CN)
- [**《Go入门指南》**](https://github.com/unknwon/the-way-to-go_ZH_CN)
- [**Mastering Go(玩转Go中文译本)**](https://github.com/hantmac/Mastering_Go_ZH_CN)