go
go的微服务框架 micro
积累
go不会把一些用户特定场景的东西归入到标准库
没有展开
技术好奇心
go因为没有java的一些的特性,而觉得不够好
但go出现这种选择的出发点,应该也是有一些考量
一门语言的生态:
https://github.com/go-errors/errors
Package errors adds stacktrace support to errors in go.
//可以print出错的日志,方便定位那个地方出错了
A pluggable RPC framework https://micro.mu
https://github.com/micro/go-micro
Micro-service framework in Go https://godoc.org/github.com/koding/kite
https://github.com/koding/kite
https://github.com/devfeel/dotweb
Simple and easy go web micro framework
http://www.itdks.com/eventlist/detail/2317
go的依赖仓库:
https://go.dev/
https://golang.google.cn/doc/tutorial/getting-started
package main import "fmt" import "rsc.io/quote" func main(){ fmt.Println("Hello,World!") fmt.Println(quote.Go()) }
root@machello % go run hello.go go: finding module for package rsc.io/quote hello.go:3:8: module rsc.io/quote: Get "https://proxy.golang.org/rsc.io/quote/@v/list": dial tcp 34.64.4.113:443: i/o timeout root@machello % root@machello % root@machello % go run hello.go go: finding module for package rsc.io/quote hello.go:3:8: module rsc.io/quote: Get "https://proxy.golang.org/rsc.io/quote/@v/list": dial tcp 34.64.4.81:443: i/o timeout root@machello % root@machello % root@machello % root@machello % go env -w GOPROXY="https://goproxy.cn,https://proxy.golang.org,direct" root@machello % root@machello % root@machello % root@machello % root@machello % go run hello.go go: finding module for package rsc.io/quote go: downloading rsc.io/quote v1.5.2 go: found rsc.io/quote in rsc.io/quote v1.5.2 go: downloading rsc.io/sampler v1.3.0 go: downloading golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c Hello,World! Don't communicate by sharing memory, share memory by communicating. root@machello %
下载第三方依赖时的要设置国内仓库:
设置国内镜像站点 https://goproxy.cn :
go env -w GOPROXY="https://goproxy.cn,https://proxy.golang.org,direct"
GOSUMDB 协议流程:
关闭 GOSUMDB:
go env -w GOSUMDB="off"
https://www.jianshu.com/p/6b7b44ed3dc9