A truly fantastic package idea! Thanks a lot for sharing it. I just wish it would be cut a little bit differently.
1 module for the formats using only the stdlib 1 module each for sqlite and excel support. That woukd allow better control over dependencies and allow me to avoid the cgo dependency, if I don't need sqlite support. On Tuesday, April 20, 2021 at 10:49:04 PM UTC+2 Jim Smart wrote: > 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/2e8c0dcc-dbcb-4d17-a7d7-6f6c4e988fcen%40googlegroups.com.