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
Unmarshal produces wrong output for yaml.MapSlice. Here is the code:
yaml.MapSlice
package main import ( "log" "gopkg.in/yaml.v2" ) var content = ` a1: f1: value1 <<: &anchor f2: value2 a2: f3: value3 <<: *anchor ` func main() { var result map[interface{}]interface{} yaml.Unmarshal([]byte(content), &result) log.Println(result) var result2 yaml.MapSlice yaml.Unmarshal([]byte(content), &result2) log.Println(result2) }
Output:
2018/03/19 10:37:04 map[a1:map[f1:value1 f2:value2] a2:map[f3:value3 f2:value2]] 2018/03/19 10:37:04 [{a1 [{f1 value1}]} {a2 [{f3 value3}]}]
f2 is missing for yaml.MapSlice.
f2
The text was updated successfully, but these errors were encountered:
That's #184.
Sorry, something went wrong.
No branches or pull requests
Unmarshal produces wrong output for
yaml.MapSlice
. Here is the code:Output:
f2
is missing foryaml.MapSlice
.The text was updated successfully, but these errors were encountered: