Hi there fellow Go Nuts and Gophers,

Whilst working on a project not long back, I created a library to easily 
write tagged structs to disk, in a variety of output formats.

https://github.com/jimsmart/peanut

Each writer has a simple Write method, that takes a tagged struct. Each 
type of struct is written to a separate file (or table), with 
header/field/column names based upon the field tags. All writers use the 
same tags.

Currently peanut has writers for CSV/TSV, Excel (.xlsx), JSONL, and SQLite 
— all of which share the same simple interface.

One of the benefits of peanut is that, during development, one can just 
focus on shape of the data records one is working with (and their 
population), and not have to think about updating the code that writes the 
data at all.

Another benefit is that one can easily switch output formats, or indeed 
support multiple output formats.

It's also handy if one wishes to e.g. output an Excel file report for 
management, summarising stats and metadata, at the end of a running task 
(aside from other exported data).

— Maybe this is useful to someone here?

Regards,
/Jim


-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/480a583b-e239-41e4-acae-55f6e967bcbcn%40googlegroups.com.

Reply via email to