pogs seems pretty awesome. Very similar to what I ended up doing in practice anyway: I always ended up defining a plain Go struct that mirrored the capnp struct (and thus motivated the github.com/glycerine/bambam mini-project for the reverse direction). So I'd love to see go-capnproto2's pogs in action.
Strangely the tests seem to fail for me, using go1.7 on osx 10.11.6 El Capitan.
Certainly could be user error on my part...I didn't try to troubleshoot much here... please advise.
jaten@jatens-MacBook-Pro ~/src/zombiezen.com/go/capnproto2/pogs (master) $ go test -v
go test -v
=== RUN TestExtract_Embed
--- FAIL: TestExtract_Embed (0.00s)
embed_test.go:40: Extract error: pogs: extract @0xfca3742893be4cde: unexpected EOF
embed_test.go:43: Extract produced {}; want {VerVal:{Val:123}}
=== RUN TestExtract_EmbedPtr
--- FAIL: TestExtract_EmbedPtr (0.00s)
embed_test.go:60: Extract error: pogs: extract @0xf705dc45c94766fd: unexpected EOF
embed_test.go:63: Extract produced {}; want {VerVal:{Val:123},Duo:456}
=== RUN TestExtract_EmbedOmit
--- FAIL: TestExtract_EmbedOmit (0.00s)
embed_test.go:80: Extract error: pogs: extract @0xf705dc45c94766fd: unexpected EOF
embed_test.go:83: Extract produced {}; want {Duo:456}
=== RUN TestExtract_EmbedName
--- FAIL: TestExtract_EmbedName (0.00s)
embed_test.go:108: Extract error: pogs: extract @0xe1c9eac512335361: unexpected EOF
embed_test.go:111: Extract produced {}; want {PlaneBase:{Name:"ALL YOUR BASE",Rating:5,CanFly:true}}
=== RUN TestInsert_Embed
--- FAIL: TestInsert_Embed (0.00s)
embed_test.go:127: Insert({VerVal:{Val:123}}) error: pogs: insert @0xfca3742893be4cde: unexpected EOF
embed_test.go:130: Insert({VerVal:{Val:123}}) produced
=== RUN TestInsert_EmbedPtr
--- FAIL: TestInsert_EmbedPtr (0.00s)
embed_test.go:146: Insert({VerVal:{Val:123},Duo:456}) error: pogs: insert @0xf705dc45c94766fd: unexpected EOF
embed_test.go:149: Insert({VerVal:{Val:123},Duo:456}) produced
=== RUN TestInsert_EmbedNilPtr
--- FAIL: TestInsert_EmbedNilPtr (0.00s)
embed_test.go:165: Insert({Duo:456}) error: pogs: insert @0xf705dc45c94766fd: unexpected EOF
embed_test.go:168: Insert({Duo:456}) produced
=== RUN TestInsert_EmbedOmit
--- FAIL: TestInsert_EmbedOmit (0.00s)
embed_test.go:184: Insert({VerVal:{Val:123},Duo:456}) error: pogs: insert @0xf705dc45c94766fd: unexpected EOF
embed_test.go:187: Insert({VerVal:{Val:123},Duo:456}) produced
=== RUN TestInsert_EmbedNamed
--- FAIL: TestInsert_EmbedNamed (0.00s)
embed_test.go:203: Insert({PlaneBase:{Name:"ALL YOUR BASE",Rating:5,CanFly:true}}) error: pogs: insert @0xe1c9eac512335361: unexpected EOF
embed_test.go:214: Insert({PlaneBase:{Name:"ALL YOUR BASE",Rating:5,CanFly:true}}) produced
=== RUN TestExtract_EmbedCollide
--- FAIL: TestExtract_EmbedCollide (0.00s)
embed_test.go:303: top: Extract error: pogs: extract @0xfca3742893be4cde: unexpected EOF
embed_test.go:306: top: Extract produced {}; want {Val:123}
embed_test.go:303: no tags: Extract error: pogs: extract @0xfca3742893be4cde: unexpected EOF
embed_test.go:303: 1 tag: Extract error: pogs: extract @0xfca3742893be4cde: unexpected EOF
embed_test.go:306: 1 tag: Extract produced {}; want {VerValTag1:{Val:123}}
embed_test.go:303: 1 tag with untagged: Extract error: pogs: extract @0xfca3742893be4cde: unexpected EOF
embed_test.go:306: 1 tag with untagged: Extract produced {}; want {VerValTag1:{Val:123}}
embed_test.go:303: 2 tags: Extract error: pogs: extract @0xfca3742893be4cde: unexpected EOF
embed_test.go:303: 3 tags: Extract error: pogs: extract @0xfca3742893be4cde: unexpected EOF
embed_test.go:303: top with lower collision: Extract error: pogs: extract @0xfca3742893be4cde: unexpected EOF
embed_test.go:306: top with lower collision: Extract produced {}; want {Val:123}
=== RUN TestInsert_EmbedCollide
--- FAIL: TestInsert_EmbedCollide (0.00s)
embed_test.go:354: top: Insert(..., {Val:123,VerVal:{Val:456}}): %!v(MISSING)
embed_test.go:357: top: Insert(..., {Val:123,VerVal:{Val:456}}) produced ; want (val = 123)
embed_test.go:354: no tags: Insert(..., {VerVal:{Val:123},VerValNoTag:{Val:456}}): %!v(MISSING)
embed_test.go:354: 1 tag: Insert(..., {VerVal:{Val:123},VerValTag1:{Val:456}}): %!v(MISSING)
embed_test.go:357: 1 tag: Insert(..., {VerVal:{Val:123},VerValTag1:{Val:456}}) produced ; want (val = 456)
embed_test.go:354: 1 tag with untagged: Insert(..., {VerVal:{Val:123},VerValTag1:{Val:456},VerValNoTag:{Val:789}}): %!v(MISSING)
embed_test.go:357: 1 tag with untagged: Insert(..., {VerVal:{Val:123},VerValTag1:{Val:456},VerValNoTag:{Val:789}}) produced ; want (val = 456)
embed_test.go:354: 2 tags: Insert(..., {VerValTag1:{Val:123},VerValTag2:{Val:456}}): %!v(MISSING)
embed_test.go:354: 3 tags: Insert(..., {VerValTag1:{Val:123},VerValTag2:{Val:456},VerValTag3:{Val:789}}): %!v(MISSING)
embed_test.go:354: top with lower collision: Insert(..., {Val:123,VerVal:{Val:456},VerValNoTag:{Val:789}}): %!v(MISSING)
embed_test.go:357: top with lower collision: Insert(..., {Val:123,VerVal:{Val:456},VerValNoTag:{Val:789}}) produced ; want (val = 123)
=== RUN TestExtract
--- FAIL: TestExtract (0.00s)
pogs_test.go:148: Extract() error: pogs: extract @0xea26e9973bd6a0d9: unexpected EOF
pogs_test.go:151: Extract() produced {}; want {Which:2,F64:3.5}
pogs_test.go:148: Extract() error: pogs: extract @0xea26e9973bd6a0d9: unexpected EOF
pogs_test.go:151: Extract() produced {}; want {Which:3,F32:3.5}
pogs_test.go:148: Extract() error: pogs: extract @0xea26e9973bd6a0d9: unexpected EOF
pogs_test.go:151: Extract() produced {}; want {Which:4,I64:-123}
pogs_test.go:148: Extract() error: pogs: extract @0xea26e9973bd6a0d9: unexpected EOF
pogs_test.go:151: Extract() produced {}; want {Which:5,I32:-123}
pogs_test.go:148: Extract() error: pogs: extract @0xea26e9973bd6a0d9: unexpected EOF
pogs_test.go:151: Extract() produced {}; want {Which:6,I16:-123}
pogs_test.go:148: Extract() error: pogs: extract @0xea26e9973bd6a0d9: unexpected EOF
pogs_test.go:151: Extract() produced {}; want {Which:7,I8:-123}
pogs_test.go:148: Extract() error: pogs: extract @0xea26e9973bd6a0d9: unexpected EOF
pogs_test.go:151: Extract() produced {}; want {Which:8,U64:123}
pogs_test.go:148: Extract() error: pogs: extract @0xea26e9973bd6a0d9: unexpected EOF
pogs_test.go:151: Extract() produced {}; want {Which:9,U32:123}
pogs_test.go:148: Extract() error: pogs: extract @0xea26e9973bd6a0d9: unexpected EOF
pogs_test.go:151: Extract() produced {}; want {Which:10,U16:123}
pogs_test.go:148: Extract() error: pogs: extract @0xea26e9973bd6a0d9: unexpected EOF
pogs_test.go:151: Extract() produced {}; want {Which:11,U8:123}
pogs_test.go:148: Extract() error: pogs: extract @0xea26e9973bd6a0d9: unexpected EOF
pogs_test.go:151: Extract() produced {}; want {Which:12,Bool:true}
pogs_test.go:148: Extract() error: pogs: extract @0xea26e9973bd6a0d9: unexpected EOF
pogs_test.go:151: Extract() produced {}; want {Which:12}
pogs_test.go:148: Extract() error: pogs: extract @0xea26e9973bd6a0d9: unexpected EOF
pogs_test.go:151: Extract() produced {}; want {Which:13,Text:"Hello, World!"}
pogs_test.go:148: Extract() error: pogs: extract @0xea26e9973bd6a0d9: unexpected EOF
pogs_test.go:151: Extract() produced {}; want {Which:14,Blob:[72,101,108,108,111,44,32,87,111,114,108,100,33]}
pogs_test.go:148: Extract() error: pogs: extract @0xea26e9973bd6a0d9: unexpected EOF
pogs_test.go:151: Extract() produced {}; want {Which:15}
pogs_test.go:148: Extract() error: pogs: extract @0xea26e9973bd6a0d9: unexpected EOF
pogs_test.go:151: Extract() produced {}; want {Which:15,F64vec:[-2,4.5]}
pogs_test.go:148: Extract() error: pogs: extract @0xea26e9973bd6a0d9: unexpected EOF
pogs_test.go:151: Extract() produced {}; want {Which:16}
pogs_test.go:148: Extract() error: pogs: extract @0xea26e9973bd6a0d9: unexpected EOF
pogs_test.go:151: Extract() produced {}; want {Which:16,F32vec:[-2,4.5]}
pogs_test.go:148: Extract() error: pogs: extract @0xea26e9973bd6a0d9: unexpected EOF
pogs_test.go:151: Extract() produced {}; want {Which:17}
pogs_test.go:148: Extract() error: pogs: extract @0xea26e9973bd6a0d9: unexpected EOF
pogs_test.go:151: Extract() produced {}; want {Which:17,I64vec:[-123,0,123]}
pogs_test.go:148: Extract() error: pogs: extract @0xea26e9973bd6a0d9: unexpected EOF
pogs_test.go:151: Extract() produced {}; want {Which:20}
pogs_test.go:148: Extract() error: pogs: extract @0xea26e9973bd6a0d9: unexpected EOF
pogs_test.go:151: Extract() produced {}; want {Which:20,I8vec:[-123,0,123]}
pogs_test.go:148: Extract() error: pogs: extract @0xea26e9973bd6a0d9: unexpected EOF
pogs_test.go:151: Extract() produced {}; want {Which:21}
pogs_test.go:148: Extract() error: pogs: extract @0xea26e9973bd6a0d9: unexpected EOF
pogs_test.go:151: Extract() produced {}; want {Which:21,U64vec:[0,123]}
pogs_test.go:148: Extract() error: pogs: extract @0xea26e9973bd6a0d9: unexpected EOF
pogs_test.go:151: Extract() produced {}; want {Which:24}
pogs_test.go:148: Extract() error: pogs: extract @0xea26e9973bd6a0d9: unexpected EOF
pogs_test.go:151: Extract() produced {}; want {Which:24,U8vec:[0,123]}
pogs_test.go:148: Extract() error: pogs: extract @0xea26e9973bd6a0d9: unexpected EOF
pogs_test.go:151: Extract() produced {}; want {Which:39}
pogs_test.go:148: Extract() error: pogs: extract @0xea26e9973bd6a0d9: unexpected EOF
pogs_test.go:151: Extract() produced {}; want {Which:39,Boolvec:[false,true,false]}
pogs_test.go:148: Extract() error: pogs: extract @0xea26e9973bd6a0d9: unexpected EOF
pogs_test.go:151: Extract() produced {}; want {Which:40}
pogs_test.go:148: Extract() error: pogs: extract @0xea26e9973bd6a0d9: unexpected EOF
pogs_test.go:151: Extract() produced {}; want {Which:40,Datavec:[[104,105],[98,121,101]]}
pogs_test.go:148: Extract() error: pogs: extract @0xea26e9973bd6a0d9: unexpected EOF
pogs_test.go:151: Extract() produced {}; want {Which:41}
pogs_test.go:148: Extract() error: pogs: extract @0xea26e9973bd6a0d9: unexpected EOF
pogs_test.go:151: Extract() produced {}; want {Which:41,Textvec:["John","Paul","George","Ringo"]}
pogs_test.go:148: Extract() error: pogs: extract @0xea26e9973bd6a0d9: unexpected EOF
pogs_test.go:151: Extract() produced {}; want {Which:25,Zvec:[{Which:4,I64:-123},{Which:13,Text:"Hi"}]}
pogs_test.go:148: Extract() error: pogs: extract @0xea26e9973bd6a0d9: unexpected EOF
pogs_test.go:151: Extract() produced {}; want {Which:26,Zvecvec:[[{Which:4,I64:1},{Which:4,I64:2}],[{Which:4,I64:3},{Which:4,I64:4}]]}
pogs_test.go:148: Extract() error: pogs: extract @0xea26e9973bd6a0d9: unexpected EOF
pogs_test.go:151: Extract() produced {}; want {Which:32}
pogs_test.go:148: Extract() error: pogs: extract @0xea26e9973bd6a0d9: unexpected EOF
pogs_test.go:151: Extract() produced {}; want {Which:32,Planebase:{Name:"Boeing",Homes:[2,5],Rating:123,CanFly:true,Capacity:100,MaxSpeed:9001}}
pogs_test.go:148: Extract() error: pogs: extract @0xea26e9973bd6a0d9: unexpected EOF
pogs_test.go:151: Extract() produced {}; want {Which:33,Airport:2}
pogs_test.go:148: Extract() error: pogs: extract @0xea26e9973bd6a0d9: unexpected EOF
pogs_test.go:151: Extract() produced {}; want {Which:42,Grp:{First:123,Second:456}}
=== RUN TestInsert
--- FAIL: TestInsert (0.00s)
pogs_test.go:170: Insert({Which:2,F64:3.5}) error: pogs: insert @0xea26e9973bd6a0d9: unexpected EOF
pogs_test.go:175: Insert({Which:2,F64:3.5}) produced
pogs_test.go:170: Insert({Which:3,F32:3.5}) error: pogs: insert @0xea26e9973bd6a0d9: unexpected EOF
pogs_test.go:175: Insert({Which:3,F32:3.5}) produced
pogs_test.go:170: Insert({Which:4,I64:-123}) error: pogs: insert @0xea26e9973bd6a0d9: unexpected EOF
pogs_test.go:175: Insert({Which:4,I64:-123}) produced
pogs_test.go:170: Insert({Which:5,I32:-123}) error: pogs: insert @0xea26e9973bd6a0d9: unexpected EOF
pogs_test.go:175: Insert({Which:5,I32:-123}) produced
pogs_test.go:170: Insert({Which:6,I16:-123}) error: pogs: insert @0xea26e9973bd6a0d9: unexpected EOF
pogs_test.go:175: Insert({Which:6,I16:-123}) produced
pogs_test.go:170: Insert({Which:7,I8:-123}) error: pogs: insert @0xea26e9973bd6a0d9: unexpected EOF
pogs_test.go:175: Insert({Which:7,I8:-123}) produced
pogs_test.go:170: Insert({Which:8,U64:123}) error: pogs: insert @0xea26e9973bd6a0d9: unexpected EOF
pogs_test.go:175: Insert({Which:8,U64:123}) produced
pogs_test.go:170: Insert({Which:9,U32:123}) error: pogs: insert @0xea26e9973bd6a0d9: unexpected EOF
pogs_test.go:175: Insert({Which:9,U32:123}) produced
pogs_test.go:170: Insert({Which:10,U16:123}) error: pogs: insert @0xea26e9973bd6a0d9: unexpected EOF
pogs_test.go:175: Insert({Which:10,U16:123}) produced
pogs_test.go:170: Insert({Which:11,U8:123}) error: pogs: insert @0xea26e9973bd6a0d9: unexpected EOF
pogs_test.go:175: Insert({Which:11,U8:123}) produced
pogs_test.go:170: Insert({Which:12,Bool:true}) error: pogs: insert @0xea26e9973bd6a0d9: unexpected EOF
pogs_test.go:175: Insert({Which:12,Bool:true}) produced
pogs_test.go:170: Insert({Which:12}) error: pogs: insert @0xea26e9973bd6a0d9: unexpected EOF
pogs_test.go:175: Insert({Which:12}) produced
pogs_test.go:170: Insert({Which:13,Text:"Hello, World!"}) error: pogs: insert @0xea26e9973bd6a0d9: unexpected EOF
pogs_test.go:175: Insert({Which:13,Text:"Hello, World!"}) produced
pogs_test.go:170: Insert({Which:14,Blob:[72,101,108,108,111,44,32,87,111,114,108,100,33]}) error: pogs: insert @0xea26e9973bd6a0d9: unexpected EOF
pogs_test.go:175: Insert({Which:14,Blob:[72,101,108,108,111,44,32,87,111,114,108,100,33]}) produced
pogs_test.go:170: Insert({Which:15}) error: pogs: insert @0xea26e9973bd6a0d9: unexpected EOF
pogs_test.go:175: Insert({Which:15}) produced
pogs_test.go:170: Insert({Which:15,F64vec:[-2,4.5]}) error: pogs: insert @0xea26e9973bd6a0d9: unexpected EOF
pogs_test.go:175: Insert({Which:15,F64vec:[-2,4.5]}) produced
pogs_test.go:170: Insert({Which:16}) error: pogs: insert @0xea26e9973bd6a0d9: unexpected EOF
pogs_test.go:175: Insert({Which:16}) produced
pogs_test.go:170: Insert({Which:16,F32vec:[-2,4.5]}) error: pogs: insert @0xea26e9973bd6a0d9: unexpected EOF
pogs_test.go:175: Insert({Which:16,F32vec:[-2,4.5]}) produced
pogs_test.go:170: Insert({Which:17}) error: pogs: insert @0xea26e9973bd6a0d9: unexpected EOF
pogs_test.go:175: Insert({Which:17}) produced
pogs_test.go:170: Insert({Which:17,I64vec:[-123,0,123]}) error: pogs: insert @0xea26e9973bd6a0d9: unexpected EOF
pogs_test.go:175: Insert({Which:17,I64vec:[-123,0,123]}) produced
pogs_test.go:170: Insert({Which:20}) error: pogs: insert @0xea26e9973bd6a0d9: unexpected EOF
pogs_test.go:175: Insert({Which:20}) produced
pogs_test.go:170: Insert({Which:20,I8vec:[-123,0,123]}) error: pogs: insert @0xea26e9973bd6a0d9: unexpected EOF
pogs_test.go:175: Insert({Which:20,I8vec:[-123,0,123]}) produced
pogs_test.go:170: Insert({Which:21}) error: pogs: insert @0xea26e9973bd6a0d9: unexpected EOF
pogs_test.go:175: Insert({Which:21}) produced
pogs_test.go:170: Insert({Which:21,U64vec:[0,123]}) error: pogs: insert @0xea26e9973bd6a0d9: unexpected EOF
pogs_test.go:175: Insert({Which:21,U64vec:[0,123]}) produced
pogs_test.go:170: Insert({Which:24}) error: pogs: insert @0xea26e9973bd6a0d9: unexpected EOF
pogs_test.go:175: Insert({Which:24}) produced
pogs_test.go:170: Insert({Which:24,U8vec:[0,123]}) error: pogs: insert @0xea26e9973bd6a0d9: unexpected EOF
pogs_test.go:175: Insert({Which:24,U8vec:[0,123]}) produced
pogs_test.go:170: Insert({Which:39}) error: pogs: insert @0xea26e9973bd6a0d9: unexpected EOF
pogs_test.go:175: Insert({Which:39}) produced
pogs_test.go:170: Insert({Which:39,Boolvec:[false,true,false]}) error: pogs: insert @0xea26e9973bd6a0d9: unexpected EOF
pogs_test.go:175: Insert({Which:39,Boolvec:[false,true,false]}) produced
pogs_test.go:170: Insert({Which:40}) error: pogs: insert @0xea26e9973bd6a0d9: unexpected EOF
pogs_test.go:175: Insert({Which:40}) produced
pogs_test.go:170: Insert({Which:40,Datavec:[[104,105],[98,121,101]]}) error: pogs: insert @0xea26e9973bd6a0d9: unexpected EOF
pogs_test.go:175: Insert({Which:40,Datavec:[[104,105],[98,121,101]]}) produced
pogs_test.go:170: Insert({Which:41}) error: pogs: insert @0xea26e9973bd6a0d9: unexpected EOF
pogs_test.go:175: Insert({Which:41}) produced
pogs_test.go:170: Insert({Which:41,Textvec:["John","Paul","George","Ringo"]}) error: pogs: insert @0xea26e9973bd6a0d9: unexpected EOF
pogs_test.go:175: Insert({Which:41,Textvec:["John","Paul","George","Ringo"]}) produced
pogs_test.go:170: Insert({Which:25,Zvec:[{Which:4,I64:-123},{Which:13,Text:"Hi"}]}) error: pogs: insert @0xea26e9973bd6a0d9: unexpected EOF
pogs_test.go:175: Insert({Which:25,Zvec:[{Which:4,I64:-123},{Which:13,Text:"Hi"}]}) produced
pogs_test.go:170: Insert({Which:26,Zvecvec:[[{Which:4,I64:1},{Which:4,I64:2}],[{Which:4,I64:3},{Which:4,I64:4}]]}) error: pogs: insert @0xea26e9973bd6a0d9: unexpected EOF
pogs_test.go:175: Insert({Which:26,Zvecvec:[[{Which:4,I64:1},{Which:4,I64:2}],[{Which:4,I64:3},{Which:4,I64:4}]]}) produced
pogs_test.go:170: Insert({Which:32}) error: pogs: insert @0xea26e9973bd6a0d9: unexpected EOF
pogs_test.go:175: Insert({Which:32}) produced
pogs_test.go:170: Insert({Which:32,Planebase:{Name:"Boeing",Homes:[2,5],Rating:123,CanFly:true,Capacity:100,MaxSpeed:9001}}) error: pogs: insert @0xea26e9973bd6a0d9: unexpected EOF
pogs_test.go:175: Insert({Which:32,Planebase:{Name:"Boeing",Homes:[2,5],Rating:123,CanFly:true,Capacity:100,MaxSpeed:9001}}) produced
pogs_test.go:170: Insert({Which:33,Airport:2}) error: pogs: insert @0xea26e9973bd6a0d9: unexpected EOF
pogs_test.go:175: Insert({Which:33,Airport:2}) produced
pogs_test.go:170: Insert({Which:42,Grp:{First:123,Second:456}}) error: pogs: insert @0xea26e9973bd6a0d9: unexpected EOF
pogs_test.go:175: Insert({Which:42,Grp:{First:123,Second:456}}) produced
=== RUN TestInsert_Size
--- FAIL: TestInsert_Size (0.00s)
pogs_test.go:403: void into 0-byte: Insert(0xea26e9973bd6a0d9, capnp.NewStruct(seg, {datasz=8 ptrs=0}), {}) = pogs: insert @0xea26e9973bd6a0d9: unexpected EOF; want nil
pogs_test.go:403: void into 1-byte: Insert(0xea26e9973bd6a0d9, capnp.NewStruct(seg, {datasz=9 ptrs=0}), {}) = pogs: insert @0xea26e9973bd6a0d9: unexpected EOF; want nil
pogs_test.go:403: bool into 1 byte: Insert(0xea26e9973bd6a0d9, capnp.NewStruct(seg, {datasz=9 ptrs=0}), {Which:12,Bool:true}) = pogs: insert @0xea26e9973bd6a0d9: unexpected EOF; want nil
pogs_test.go:403: int8 into 1-byte: Insert(0xea26e9973bd6a0d9, capnp.NewStruct(seg, {datasz=9 ptrs=0}), {Which:7,I8:123}) = pogs: insert @0xea26e9973bd6a0d9: unexpected EOF; want nil
pogs_test.go:403: uint8 into 1-byte: Insert(0xea26e9973bd6a0d9, capnp.NewStruct(seg, {datasz=9 ptrs=0}), {Which:11,U8:123}) = pogs: insert @0xea26e9973bd6a0d9: unexpected EOF; want nil
pogs_test.go:403: int16 into 2-byte: Insert(0xea26e9973bd6a0d9, capnp.NewStruct(seg, {datasz=10 ptrs=0}), {Which:6,I16:123}) = pogs: insert @0xea26e9973bd6a0d9: unexpected EOF; want nil
pogs_test.go:403: uint16 into 2-byte: Insert(0xea26e9973bd6a0d9, capnp.NewStruct(seg, {datasz=10 ptrs=0}), {Which:10,U16:123}) = pogs: insert @0xea26e9973bd6a0d9: unexpected EOF; want nil
pogs_test.go:403: enum into 2-byte: Insert(0xea26e9973bd6a0d9, capnp.NewStruct(seg, {datasz=10 ptrs=0}), {Which:33,Airport:1}) = pogs: insert @0xea26e9973bd6a0d9: unexpected EOF; want nil
pogs_test.go:403: int32 into 4-byte: Insert(0xea26e9973bd6a0d9, capnp.NewStruct(seg, {datasz=12 ptrs=0}), {Which:5,I32:123}) = pogs: insert @0xea26e9973bd6a0d9: unexpected EOF; want nil
pogs_test.go:403: uint32 into 4-byte: Insert(0xea26e9973bd6a0d9, capnp.NewStruct(seg, {datasz=12 ptrs=0}), {Which:9,U32:123}) = pogs: insert @0xea26e9973bd6a0d9: unexpected EOF; want nil
pogs_test.go:403: float32 into 4-byte: Insert(0xea26e9973bd6a0d9, capnp.NewStruct(seg, {datasz=12 ptrs=0}), {Which:3,F32:123}) = pogs: insert @0xea26e9973bd6a0d9: unexpected EOF; want nil
pogs_test.go:403: int64 into 8-byte: Insert(0xea26e9973bd6a0d9, capnp.NewStruct(seg, {datasz=16 ptrs=0}), {Which:4,I64:123}) = pogs: insert @0xea26e9973bd6a0d9: unexpected EOF; want nil
pogs_test.go:403: uint64 into 8-byte: Insert(0xea26e9973bd6a0d9, capnp.NewStruct(seg, {datasz=16 ptrs=0}), {Which:8,U64:123}) = pogs: insert @0xea26e9973bd6a0d9: unexpected EOF; want nil
pogs_test.go:403: float64 into 8-byte: Insert(0xea26e9973bd6a0d9, capnp.NewStruct(seg, {datasz=16 ptrs=0}), {Which:2,F64:123}) = pogs: insert @0xea26e9973bd6a0d9: unexpected EOF; want nil
pogs_test.go:403: text into 1 pointer: Insert(0xea26e9973bd6a0d9, capnp.NewStruct(seg, {datasz=8 ptrs=1}), {Which:13,Text:"hi"}) = pogs: insert @0xea26e9973bd6a0d9: unexpected EOF; want nil
pogs_test.go:403: data into 1 pointer: Insert(0xea26e9973bd6a0d9, capnp.NewStruct(seg, {datasz=8 ptrs=1}), {Which:14,Blob:[104,105]}) = pogs: insert @0xea26e9973bd6a0d9: unexpected EOF; want nil
pogs_test.go:403: list into 1 pointer: Insert(0xea26e9973bd6a0d9, capnp.NewStruct(seg, {datasz=8 ptrs=1}), {Which:15,F64vec:[123]}) = pogs: insert @0xea26e9973bd6a0d9: unexpected EOF; want nil
pogs_test.go:403: struct into 1 pointer: Insert(0xea26e9973bd6a0d9, capnp.NewStruct(seg, {datasz=8 ptrs=1}), {Which:32,Planebase:{}}) = pogs: insert @0xea26e9973bd6a0d9: unexpected EOF; want nil
=== RUN TestExtract_StringBytes
--- FAIL: TestExtract_StringBytes (0.00s)
pogs_test.go:432: Extract() error: pogs: extract @0xea26e9973bd6a0d9: unexpected EOF
pogs_test.go:436: Extract() produced {}; want {Which:13,Text:[72,101,108,108,111,44,32,87,111,114,108,100,33]}
=== RUN TestExtract_StringListBytes
--- FAIL: TestExtract_StringListBytes (0.00s)
pogs_test.go:455: Extract() error: pogs: extract @0xea26e9973bd6a0d9: unexpected EOF
pogs_test.go:459: Extract() produced {}; want {Which:41,Textvec:[[72,111,108,109,101,115],[87,97,116,115,111,110]]}
=== RUN TestInsert_StringBytes
--- FAIL: TestInsert_StringBytes (0.00s)
pogs_test.go:475: Insert({Which:13,Text:[72,101,108,108,111,44,32,87,111,114,108,100,33]}) error: pogs: insert @0xea26e9973bd6a0d9: unexpected EOF
pogs_test.go:481: Insert({Which:13,Text:[72,101,108,108,111,44,32,87,111,114,108,100,33]}) produced
=== RUN TestInsert_StringListBytes
--- FAIL: TestInsert_StringListBytes (0.00s)
pogs_test.go:497: Insert({Which:41,Textvec:[[72,111,108,109,101,115],[87,97,116,115,111,110]]}) error: pogs: insert @0xea26e9973bd6a0d9: unexpected EOF
pogs_test.go:503: Insert({Which:41,Textvec:[[72,111,108,109,101,115],[87,97,116,115,111,110]]}) produced
=== RUN TestExtract_StructNoPtr
--- FAIL: TestExtract_StructNoPtr (0.00s)
pogs_test.go:530: Extract() error: pogs: extract @0xea26e9973bd6a0d9: unexpected EOF
pogs_test.go:534: Extract() produced {}; want {Which:32,Planebase:{Name:"foo"}}
=== RUN TestExtract_StructListNoPtr
--- FAIL: TestExtract_StructListNoPtr (0.00s)
pogs_test.go:555: Extract() error: pogs: extract @0xea26e9973bd6a0d9: unexpected EOF
pogs_test.go:561: Extract() produced {}; want {Which:25,Zvec:[{Which:4,I64:123}]}
=== RUN TestExtract_GroupNoPtr
--- FAIL: TestExtract_GroupNoPtr (0.00s)
pogs_test.go:580: Extract() error: pogs: extract @0xea26e9973bd6a0d9: unexpected EOF
pogs_test.go:584: Extract() produced {}; want {Which:42,Grp:{First:123,Second:456}}
=== RUN TestInsert_StructNoPtr
--- FAIL: TestInsert_StructNoPtr (0.00s)
pogs_test.go:600: Insert({Which:32,Planebase:{Name:"foo"}}) error: pogs: insert @0xea26e9973bd6a0d9: unexpected EOF
pogs_test.go:606: Insert({Which:32,Planebase:{Name:"foo"}}) produced
=== RUN TestInsert_StructListNoPtr
--- FAIL: TestInsert_StructListNoPtr (0.00s)
pogs_test.go:624: Insert({Which:25,Zvec:[{Which:4,I64:123}]}) error: pogs: insert @0xea26e9973bd6a0d9: unexpected EOF
pogs_test.go:632: Insert({Which:25,Zvec:[{Which:4,I64:123}]}) produced
=== RUN TestInsert_GroupNoPtr
--- FAIL: TestInsert_GroupNoPtr (0.00s)
pogs_test.go:648: Insert({Which:42,Grp:{First:123,Second:456}}) error: pogs: insert @0xea26e9973bd6a0d9: unexpected EOF
pogs_test.go:654: Insert({Which:42,Grp:{First:123,Second:456}}) produced
=== RUN TestExtract_Tags
--- FAIL: TestExtract_Tags (0.00s)
pogs_test.go:705: renamed field: Extract error: pogs: extract @0xea26e9973bd6a0d9: unexpected EOF
pogs_test.go:708: renamed field: Extract produced {}; want {Which:2,Float64:3.5}
pogs_test.go:705: omitted field: Extract error: pogs: extract @0xea26e9973bd6a0d9: unexpected EOF
pogs_test.go:708: omitted field: Extract produced {}; want {Which:4}
pogs_test.go:705: field with overlapping name: Extract error: pogs: extract @0xea26e9973bd6a0d9: unexpected EOF
pogs_test.go:708: field with overlapping name: Extract produced {}; want {Which:12,U8:true}
=== RUN TestInsert_Tags
--- FAIL: TestInsert_Tags (0.00s)
pogs_test.go:748: renamed field: Insert({Which:2,Float64:3.5}) error: pogs: insert @0xea26e9973bd6a0d9: unexpected EOF
pogs_test.go:753: renamed field: Insert({Which:2,Float64:3.5}) produced
pogs_test.go:748: omitted field: Insert({Which:4,I64:42}) error: pogs: insert @0xea26e9973bd6a0d9: unexpected EOF
pogs_test.go:753: omitted field: Insert({Which:4,I64:42}) produced
pogs_test.go:748: field with overlapping name: Insert({Which:12,U8:true}) error: pogs: insert @0xea26e9973bd6a0d9: unexpected EOF
pogs_test.go:753: field with overlapping name: Insert({Which:12,U8:true}) produced
=== RUN TestExtract_WhichTag
--- FAIL: TestExtract_WhichTag (0.00s)
pogs_test.go:777: Extract error: pogs: extract @0xea26e9973bd6a0d9: unexpected EOF
pogs_test.go:780: Extract produced {}; want {Bool:true}
=== RUN TestExtract_WhichTagMismatch
--- PASS: TestExtract_WhichTagMismatch (0.00s)
=== RUN TestInsert_WhichTag
--- FAIL: TestInsert_WhichTag (0.00s)
pogs_test.go:814: Insert({Bool:true}) error: pogs: insert @0xea26e9973bd6a0d9: unexpected EOF
pogs_test.go:820: Insert({Bool:true}) produced
=== RUN TestExtraFields
--- PASS: TestExtraFields (0.00s)
=== RUN ExampleExtract
--- FAIL: ExampleExtract (0.00s)
panic: pogs: extract @0x8100cc88d7d4d47c: unexpected EOF [recovered]
panic: pogs: extract @0x8100cc88d7d4d47c: unexpected EOF
goroutine 1 [running]:
panic(0x172be0, 0xc42020e120)
/usr/local/go/src/runtime/panic.go:500 +0x1a1
testing.runExample.func2(0xecf52be3b, 0xc40701daf1, 0x2797e0, 0xc42002a050, 0xc42002a010, 0xc4201f2c00, 0x1aa5af, 0xe, 0x1c5440, 0x1ae93c, ...)
/usr/local/go/src/testing/example.go:109 +0x392
panic(0x172be0, 0xc42020e120)
/usr/local/go/src/runtime/panic.go:458 +0x243
zombiezen.com/go/capnproto2/pogs_test.ExampleExtract()
/Users/jaten/src/zombiezen.com/go/capnproto2/pogs/example_test.go:45 +0x2ef
testing.runExample(0x1aa5af, 0xe, 0x1c5440, 0x1ae93c, 0x1f, 0x0, 0x0)
/usr/local/go/src/testing/example.go:114 +0x1a0
testing.RunExamples(0x1c4d08, 0x272e80, 0x2, 0x2, 0xe200)
/usr/local/go/src/testing/example.go:38 +0x15e
testing.(*M).Run(0xc420037ee8, 0x1)
/usr/local/go/src/testing/testing.go:744 +0xbd
main.main()
zombiezen.com/go/capnproto2/pogs/_test/_testmain.go:122 +0xc6
exit status 2
FAIL zombiezen.com/go/capnproto2/pogs 1.255s
jaten@jatens-MacBook-Pro ~/src/zombiezen.com/go/capnproto2/pogs (master) $