const (
Address = ":50051"
)
func main() {
listen, err := net.Listen("tcp", Address)
if err != nil {
log.Fatalf("failed to listen: %v", err)
}
log.Printf("listen on: %s\n", Address)
}
当我跑步时:go run main.go
我收到此错误:
build command-line-arguments: cannot load github.com/golang/protobuf/proto: module github.com/golang/protobuf/proto: Get https://proxy.golang.org/github.com/golang/protobuf/proto/@v/list: dial tcp 216.58.200.241:443: connectex: A connection attempt failed because the connected party did not properly respond after a period of time, or established
connection failed because connected host has failed to respond.
答案 0 :(得分:0)
执行以下步骤:
go get github.com/golang/protobuf
go run main.go