I ran into a problem when a struct contained a CreatedAt field and one of its substruct (eg. Inner) also contained a name with the same field name. The type of both fields were time.Time. When exported to CSV the column name of Inner was not prefixed with "Inner", so in the resulting header field list CreatedAt occured two times.
I expected CreatedAt and Inner.CreatedAt as column names instead of CreatedAt, CreatedAt.
After some debugging I hope I was able to find the root cause and provide a fix for it. I created a test case too.
Hi,
I ran into a problem when a struct contained a CreatedAt field and one of its substruct (eg. Inner) also contained a name with the same field name. The type of both fields were time.Time. When exported to CSV the column name of Inner was not prefixed with "Inner", so in the resulting header field list CreatedAt occured two times.
I expected CreatedAt and Inner.CreatedAt as column names instead of CreatedAt, CreatedAt.
After some debugging I hope I was able to find the root cause and provide a fix for it. I created a test case too.
Thx, joe