You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First of all, amazing work guys. This library is very straightforward to use and a lot more user friendly than encoding/csv.
I'm trying to dynamically set the headers based on my actual data. Odd request I know, but I couldn't find an API within the library that allowed me to do this.
The only thing I can think of is blowing away the first row of headers that I do know, and then just prepending to the string aka csv.
Is there a way I can intercept the MarshalBytes or MarshalX function with what the headers should display as?
Obvs I can't dynamically set struct tags but wondering if there's something within the API surface that I am missing.
Also willing to contribute if others are looking for this and it doesn't exist!
The text was updated successfully, but these errors were encountered:
@oshalygin
I’ve created a new package that can dynamically change headers, and I have used gocsv as a reference for most of the csv generation process. (Thanks to all gocsv contributors.) I hope the ideas are helpful to you. https://github.com/shigetaichi/xsv
First of all, amazing work guys. This library is very straightforward to use and a lot more user friendly than
encoding/csv
.I'm trying to dynamically set the headers based on my actual data. Odd request I know, but I couldn't find an API within the library that allowed me to do this.
The only thing I can think of is blowing away the first row of headers that I do know, and then just prepending to the string aka csv.
Is there a way I can intercept the
MarshalBytes
orMarshalX
function with what the headers should display as?Obvs I can't dynamically set struct tags but wondering if there's something within the API surface that I am missing.
Also willing to contribute if others are looking for this and it doesn't exist!
The text was updated successfully, but these errors were encountered: