Setter not working for non-pointer Fields?

Bug #1096149 reported by Christian Neumann
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
goyaml
New
Undecided
Unassigned

Bug Description

I want to use the Setter interface to (un)marshal into custom types. I can't get this to work, and the sources/tests of goyaml won't enlighten me. Maybe it's a bug? A simillar implementation with encoding/json works fine. One of the tests (TestUnmarshalWithSetter) for this feature of goyaml uses a pointer field. Without the pointer, it won't work (maybe its more like a missing feature?).

I attached a sample go file using both encoding/json and goyaml. I want this to work without changing the field to a pointer. But beside that, it also won't work after changing to a pointer field.

Thanks :) !

Revision history for this message
Christian Neumann (cneumann) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.