Closed ssz1997 closed 1 year ago
go code still compiles if the struct tags are not formatted correctly, so i can only assume that if the tag is not "complete" it is ignored. so in this case, the Dataset
field would be parsed with the default format of Dataset
rather than the struct tag override of dataset
@Xenorith Thanks. Turns out when calling yaml.marshal
in the k8s package, there are 3 steps: json.marshal
, yaml.unmarshal
, and finally yaml.marshal
. The json step is correctly parsed, and the following yaml steps were not depend on the struct tag because there's no struct involved. So we still get the correct output...
Missing quotation mark. Now I wonder do all the yaml tags even matter...Will find some time to find out.