开源库

2018/03/22 posted in  Golang

UUID生成 : https://github.com/dreamans/guuid
Golang动态口令库:https://github.com/xlzd/gotp
复杂JSON参数解析库: https://github.com/bitly/go-simplejson
时间解析库carbon:https://github.com/golang-module/carbon

仓库资源

如果在 go get 或者 glide get 的时候提示以下错误:

[WARN] Unable to checkout golang.org/x/crypto
[ERROR] Update failed for golang.org/x/crypto: Cannot detect VCS
[WARN] Unable to checkout golang.org/x/net
[ERROR] Update failed for golang.org/x/net: Cannot detect VCS
[ERROR] Failed to install: Cannot detect VCS
Cannot detect VCS

解决方法是设置golang.org镜像到github.com/golang

glide mirror set https://golang.org/x/mobile https://github.com/golang/mobile --vcs git
glide mirror set https://golang.org/x/crypto https://github.com/golang/crypto --vcs git
glide mirror set https://golang.org/x/net https://github.com/golang/net --vcs git
glide mirror set https://golang.org/x/tools https://github.com/golang/tools --vcs git
glide mirror set https://golang.org/x/text https://github.com/golang/text --vcs git
glide mirror set https://golang.org/x/image https://github.com/golang/image --vcs git
glide mirror set https://golang.org/x/sys https://github.com/golang/sys --vcs git
glide mirror set https://golang.org/x/net/websocket https://github.com/gorilla/websocket --vcs git