[go-nuts] Re: [ANN] peanut - write tagged structs to disk, in a variety of formats
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.
Re: [go-nuts] What is the the gccgo equivalent of -X importpath.name=value
You could use the Go module support to tie the cli version to the version of your cli module. The module version can now be optained from the binary via https://godoc.org/runtime/debug#ReadBuildInfo and then in BuildInfo.Module.Version field. Since that is part of the official Go std-library, gccgo probably supports that too. -- 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/55f67405-2c57-4c75-89d9-82717a1ef870o%40googlegroups.com.
[go-nuts] Consume RESTful API Endpoints within a golang application with webtoken
I can only recommend https://pkg.go.dev/golang.org/x/oauth2/clientcredentials?tab=doc if you are implementing that. Configure clientcredentials.Config and use the http.Client returned by the Client method of that Config to do all your http calls. It manages all the token refreshing automatically and transparently for you and is pretty battle hardened already. -- 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/df2c6b50-1d45-4e6d-9c97-1d487a994c7e%40googlegroups.com.
[go-nuts] causal profiling in Go
Hi everyone, does someone has experience with causal profiling in Go? (see http://www.sigops.org/sosp/sosp15/current/2015-Monterey/printable/090-curtsinger.pdf if you are not aware of that topic) Please note that I am aware of https://morsmachine.dk/causalprof but I want to hear a few more opinions on this. I am also aware of the standard go profiling. So anyone else who tried Daniels work? Best Regards Ingo -- 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/065b67f1-db33-4f84-bf41-0b83ba192ab8%40googlegroups.com.
[go-nuts] Any alternative to go-bindata that supports dynamic assets?
https://tech.townsourced.com/post/embedding-static-files-in-go/ is a great article comparing multiple asset embedding solutions. You may come to different conclusion than the author depending on your own tradeoffs, but I found the comparison table very useful for making those decisions myself. -- 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/712f9506-ed06-4b58-9653-77c81a95eafd%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
[go-nuts] Q16.16 fixed point numbers in go
https://godoc.org/golang.org/x/image/math/fixed might provide some hints how to work with this kind of type. The idea is to use a special type and provide all operations you need. https://godoc.org/math/big#Rat might be helpful to create first tests of the basic math operations with maximum precision, before reducing precision with a conversion to a more limited data type. -- 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. For more options, visit https://groups.google.com/d/optout.
[go-nuts] Re: Announcing pytogo. a crude but surprisingly effective Python to Go translator
Hi Michael, while I understand that you are having fun with the pytogo translator, please note that a base36 encoder is already part of the Go stdlib Namely https://golang.org/pkg/math/big/#Int.Text supports a base of 36 for big integers and https://golang.org/pkg/strconv/#FormatInt supports base 36 as well. Maybe this helps reducing the python code you need to convert as well as speed up the result by accident. Have fun! -- 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. For more options, visit https://groups.google.com/d/optout.
[go-nuts] Looking for a way to monitor all active Go channels
I would suggest opening an issue for that, if it isn't. A runtime provided profile similar to the contention profile might be very useful here. But that needs careful design. -- 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. For more options, visit https://groups.google.com/d/optout.
[go-nuts] Re: AWS S3 Image Upload with Golang
You seem to ignore the error from out.Close() What is out.Close reporting after the io.Copy? -- 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. For more options, visit https://groups.google.com/d/optout.
[go-nuts] [ANN] Go Performance Playground
I love the idea and it is a really great service to the community. What I am asking myself: Why couldn't I use the standard Go benchmark interface defined in https://godoc.org/testing ? This would allow me to quickly share any benchmark I did write already. Where can I see what machine and go version this has been run on so I can replicate results locally? -- 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. For more options, visit https://groups.google.com/d/optout.
[go-nuts] Re: [ANN] atomic operations as methods on types
Thx for the valuable feedback! I just added a bugs section to the package doc so it's transparent, that the same limitations (and workarounds) apply as in the sync/atomic package. -- 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. For more options, visit https://groups.google.com/d/optout.
[go-nuts] [ANN] atomic operations as methods on types
Hi all, I wrote a small package which implements atomic operations on types. This is more comfortable to use and enabled building an atomic boolean type (which has been the motivation) here. Documentation at https://godoc.org/github.com/nightlyone/atomic Source code at: https://github.com/nightlyone/atomic License: BSD-3-Clause (same as the Go project) NOTES on explicit omissions: * no support for unsafe.Pointer, because I want it to be useful in appengine (where unsafe is forbidden) * no support for uintptr to discourage dangerous patterns involving pointers * no support for SwapXXX, since one usually should use CompareAndSwap instead to make sure the atomic value is in the expected state before changing it (the go runtime avoids it too, probably for the same reason) Feedback is very welcome. Enjoy! Ingo -- 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. For more options, visit https://groups.google.com/d/optout.
[go-nuts] Need suggestion for bad code of reflection (using FieldByNameFunc and FieldByName inside it)
What checks are you doing on struct field names and tags? That will be crucial to answering your question. -- 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. For more options, visit https://groups.google.com/d/optout.
[go-nuts] Donating to Go/related causes
Sponsor a meetup nearby. Or help them with a venue or catering. Speak on a local conference or meetup about how Go has been key to your success to encourage others to pursue their dreams. Make a workshop for newbies in your area. Happy donating. -- 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. For more options, visit https://groups.google.com/d/optout.
Re: [go-nuts] Single instance of program
Are you looking for something like https://godoc.org/github.com/nightlyone/lockfile ? -- 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. For more options, visit https://groups.google.com/d/optout.
Re: [go-nuts] Wordbreak and word extraction in Go?
thx Marcel, filed an issue here: https://github.com/golang/go/issues/17256 if you could outline a possible designe there, that would be great. On Thursday, September 22, 2016 at 5:51:48 PM UTC+2, Marcel van Lohuizen wrote: > > Hi Ingo, > > Thanks for your interest in x/text! Text segmentation is high on the > priority list for x/text, but not yet implemented. Indeed, x/text/cases > implements a (close) approximation of Annex #29 optimized for title casing, > but it is not the full thing. > > For now, if your main interest is word segmentation, your best bet is to > use github.com/blevesearch/segment. This is a decent implementation of > Annex #29 for word breaking. I've been talking with Marty to see if this > can be integrated with x/text even. > > But it would help to file an issue with exactly what you need. > > Please let me know if you have any other questions. > > Best regards, > > Marcel > > > On Wed, Sep 21, 2016 at 5:41 AM, Nigel Tao <nige...@golang.org > > wrote: > >> On Wed, Sep 21, 2016 at 7:34 AM, 'Ingo Oeser' via golang-nuts >> <golan...@googlegroups.com > wrote: >> > I am pretty sure I am overlooking something in the repository >> https://godoc.org/golang.org/x/text but I cannot find something to split >> text into words according to the next Unicode word splitting algorithm. >> > >> > Has anyone examples or can point me to the right direction? Can anyone >> confirm that this is missing? If missing, I would like to file an issue >> against the text repository for this. >> >> I'd ask mpvl (CC'ed). >> > > -- 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. For more options, visit https://groups.google.com/d/optout.
Re: [go-nuts] Wordbreak and word extraction in Go?
Thanks for the suggestion, but I am looking for an implementation of http://unicode.org/reports/tr29/ -- 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. For more options, visit https://groups.google.com/d/optout.
[go-nuts] Wordbreak and word extraction in Go?
Hi all, I am pretty sure I am overlooking something in the repository https://godoc.org/golang.org/x/text but I cannot find something to split text into words according to the next Unicode word splitting algorithm. Has anyone examples or can point me to the right direction? Can anyone confirm that this is missing? If missing, I would like to file an issue against the text repository for this. -- 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. For more options, visit https://groups.google.com/d/optout.
[go-nuts] Is SizedReaderAt coming back in 1.8?
The missing inclusion stems from a misunderstanding of the intended api. The Size method should return the upper bound for the offset passed to ReadAt known ahead of time. If the upper bound cannot be detected, the SizedReaderAt will simply fail creation. When the Size changes, ReadAt will return any errors related to that. So there really is no need for Size to return an error. The misunderstanding happened while trying to make os.File satisfy this interface, while it actually needs a small helper function doing File.Stat ahead of time and a small intermediate type to convert between them. -- 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. For more options, visit https://groups.google.com/d/optout.
[go-nuts] Looking for info on how Go package developers handle breaking changes with other packages
Please note that there is no concept central repository of Go code. Those questions in the survey are very confusing for a Go developer. Maybe you could exclude those questions for Go developers. Otherwise you would need to ignore the results for Go developers here in your later analysis. -- 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. For more options, visit https://groups.google.com/d/optout.
Re: [go-nuts] http.Client returning "http2: no cached connection was available"
Could you document your workaround here? It might be needed by others for the next 6 months because the bug has been classified as Go 1.8 work. -- 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. For more options, visit https://groups.google.com/d/optout.