Created
October 29, 2016 08:39
-
-
Save kasuganosora/656b7758a60d6fe87e3d9f76f8842c75 to your computer and use it in GitHub Desktop.
Golang GRPC 生成protobuf类产生循环引用的解决方法
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
正确的姿势是 | |
protoc --go_out=plugins=grpc:. *.proto |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
我测试了这样还是会报溢出。
message Persion{
Person child=1,
Person father=2,
}
p1 = new
p2 = new
p1.child = &p2
p2.father = &p1
p1.Marshal() // runtime: goroutine stack exceeds 1000000000-byte limit
// fatal error: stack overflow