Yaml marshal/unmarshal imported structs

I’m playing with yaml and imported structs and not getting expected results. When I create an x509 certificate, I can print a value like PostalCode, but when I try to dump it to yaml, it looks like the nested data is empty. I’d like to do this to create and use golden yaml files for testing certificate automation. Here is an example. Thanks in advance for any suggestions:



I’m looking at these structs:

And I think yaml needs to work with public structs so maybe that’s where my problem is:

// Note: struct fields must be public in order for unmarshal to
// correctly populate the data.

I think I broke myself mindlessly copying syntax form an example. This works https://play.golang.org/p/KMmEnYP9Rw9

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.