We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
package main import ( "github.com/guregu/dynamo" ) func main() { type item struct { ChildItems []item } dynamo.MarshalItem(item{}) }
Running this code crashes with panic:
runtime: goroutine stack exceeds 1000000000-byte limit runtime: sp=0xc020380318 stack=[0xc020380000, 0xc040380000] fatal error: stack overflow runtime stack: runtime.throw({0x6bcc91?, 0x200000008?}) /usr/lib/go/src/runtime/panic.go:1077 +0x5c fp=0x7fdd6d1ecca0 sp=0x7fdd6d1ecc70 pc=0x4363dc runtime.newstack() /usr/lib/go/src/runtime/stack.go:1107 +0x5ac fp=0x7fdd6d1ece50 sp=0x7fdd6d1ecca0 pc=0x44fc0c traceback: unexpected SPWRITE function runtime.morestack runtime.morestack() /usr/lib/go/src/runtime/asm_amd64.s:593 +0x8f fp=0x7fdd6d1ece58 sp=0x7fdd6d1ece50 pc=0x46542f goroutine 1 [running]: reflect.(*rtype).NumField(0x68da20?) /usr/lib/go/src/reflect/type.go:760 +0x65 fp=0xc020380328 sp=0xc020380320 pc=0x484905 github.com/guregu/dynamo.visitTypeFields({0x9d3480?, 0x68da20?}, 0x0, {0x0, 0x0, 0x0}, 0xc020380608) ... ...
The text was updated successfully, but these errors were encountered:
fix encoding recursive structs (#227)
aa3c35c
Hello. Sorry about that. I just released v1.22.2 which should fix this issue. Please give it a try.
Sorry, something went wrong.
support A -> B -> A recursive types (#227)
b2544f3
v1.22.3 (just released) supports deeper recursion beyond simple self-recursion. This wacky type works now!
type MegaRecursiveA struct { ID int Child MegaRecursiveB Text string Friends []MegaRecursiveA Enemies []MegaRecursiveB } type MegaRecursiveB struct { ID string Child *MegaRecursiveA Blah int `dynamo:",omitempty"` }
No branches or pull requests
Running this code crashes with panic:
The text was updated successfully, but these errors were encountered: