golang之常用第三方包汇总

  汇总golang日常开发中常用的库包

 

[web] 

gin:  github.com/gin-gonic/gin

 

 

[MySQL]

gorm:

 

[Redis]

go-redis:   github.com/go-redis/redis/v8

 

 

 

 

 

 

 

 

[工具]

多版本管理: 

https://github.com/voidint/g

安装:

////////////////////////// 自动化安装
# linux/mac
# 建议安装前清空`GOROOT`、`GOBIN`等环境变量
$ curl -sSL https://raw.githubusercontent.com/voidint/g/master/install.sh | bash
$ echo "unalias g" >> ~/.bashrc # 可选。若其他程序(如'git')使用了'g'作为别名。
$ source "$HOME/.g/env"

#windows
$ iwr https://raw.githubusercontent.com/voidint/g/master/install.ps1 -useb | iex

使用:

# 查询当前可供安装的稳定版本
$ g ls-remote stable
  1.19.10
  1.20.5

# 安装指定版本
$ g install 1.14.7
Downloading 100% [===============] (92/92 MB, 12 MB/s)               
Computing checksum with SHA256
Checksums matched
Now using go1.20.5

# 查看已安装的go版本
g ls

 

 

 

[其他]

 

posted @ 2022-10-12 18:45  X-Wolf  阅读(216)  评论(0编辑  收藏  举报