SetYAML(...) ignored for quoted or block strings

Bug #1102712 reported by tiffon
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
goyaml
New
Undecided
Unassigned

Bug Description

The `SetYAML(tag string, value interface{}) bool` method is ignored when the yaml value for the field is either a quoted or block string. Not sure if this is by design...?

Given the following yaml:

    a: not ignored
    b: 'is ignored'
    c: >
      is ignored

If a, b and c are of the same type and the type implements the `SetYAML(...)` method, the method will be ignored for b and c.

I've attached a code sample that shows the issue.

FWIW, changing [this code block][1] so it always executes the `else` block works around the issue.

[1]:http://bazaar.launchpad.net/~gophers/goyaml/trunk/view/head:/decode.go#L300

Revision history for this message
tiffon (joe-farro) wrote :
Revision history for this message
Vasiliy Tolstov (vase) wrote :

Hi All. I'm affected by this bug too. I'm try to parse regexp in yaml thats need quotes. Why this bug not closed ??

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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