Re: [go-nuts] Re: How to know if interface{} data is nil w/o reflecting?

2020-08-23 Thread Aviv Eyal
I was trying to show that the current behavior is confusing and that fmt.Print() needing to resort to panic-and-recover is kinda code smell, but I sorts-of convinced myself that the current behavior is right, or at least consistent. In my code, I got bit because I sometimes use v *Type to denot

[go-nuts] Re: About Libraries Versioning

2019-11-22 Thread Eyal
Summaries my conclusions on this journey: https://posener.github.io/branch-strategy/ Enjoy! On Wednesday, November 20, 2019 at 3:42:11 PM UTC+2, Eyal wrote: > > Hi > > The recommended way <https://blog.golang.org/v2-go-modules> to create a > new version for a go libr

Re: [go-nuts] About Libraries Versioning

2019-11-20 Thread Eyal
Of coarse, sorry for not mentioning it. I still think that this is a major issue. On Wednesday, November 20, 2019 at 3:47:25 PM UTC+2, Jan Mercl wrote: > > On Wed, Nov 20, 2019 at 2:42 PM Eyal > > wrote: > > > The recommended way to create a new version for a go library

[go-nuts] About Libraries Versioning

2019-11-20 Thread Eyal
? It feels like a wrong direction to the community to me. I would appreciate if you have any solutions or opinions about it. Thanks! Eyal -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving

[go-nuts] gitfs - a complete solution for static files in Go code

2019-07-21 Thread Eyal
l <https://github.com/posener/gitfs/blob/master/fsutil> package provides enhancements over the http.FileSystem object (They can work with any object that implements the interface) such as loading Go templates in the standard way, or walking over the filesystem. Cheers, Eyal -- You recei

[go-nuts] Chrome extension: enhances github with godoc.org synopsis and link

2019-06-16 Thread Eyal
ore/detail/fhlenghekakdnaamlbkhhnnhdlpfpfej Github project: https://github.com/posener/chrome-github-godoc Cheers, Eyal -- 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

[go-nuts] fcontext: context with pseudo-constant values access-time

2019-05-27 Thread Eyal
sener/fcontext Cheers, Eyal -- 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 w

Re: [go-nuts] goreadme - automate Github Go projects readme files.

2019-03-12 Thread eyal
It would make sense that gddo will support versioned documentation. On Tue, Mar 12, 2019 at 4:41 AM Sameer Ajmani wrote: > Any of the above :-) > On Mon, Mar 11, 2019 at 1:13 PM Eyal wrote: > >> >> >> On Sunday, March 10, 2019 at 12:10:23 AM UTC+2, Sameer Ajmani wro

Re: [go-nuts] goreadme - automate Github Go projects readme files.

2019-03-11 Thread Eyal
gs like "module name", "available module versions", per-version documentation? > S > > On Fri, Mar 8, 2019 at 8:34 AM Eyal > > wrote: > >> Hi >> >> I've created this Github App that automates the creation of readme files. >> It

[go-nuts] goreadme - automate Github Go projects readme files.

2019-03-08 Thread Eyal
oc of projects who use it. Please check it out: Website: https://goreadme.herokuapp.com. Github App page: https://github.com/apps/goreadme Github pages: - Server: https://github.com/posener/goreadme-server - Library: https://github.com/posener/goreadme Enjoy, Eyal -- You received this me

[go-nuts] Re: [Proposal] Goroutine Scoped Context

2018-10-15 Thread Eyal
Part 2: scoped context proposal. https://posener.github.io/context-scoping/ Please post replies in the blog itself. Enjoy! On Wednesday, October 10, 2018 at 9:38:18 PM UTC+3, Eyal wrote: > > Hi, > I wrote a proposal about making the context goroutine scoped. > Please read the cu

[go-nuts] [Proposal] Goroutine Scoped Context

2018-10-10 Thread Eyal
Hi, I wrote a proposal about making the context goroutine scoped. Please read the current design problems and how I suggest to solve them: https://posener.github.io/goroutine-scoped-context <https://posener.github.io/goroutine-scoped-context/> Thanks, Eyal -- You received this message b

[go-nuts] Re: HTTP/2 Adventure in the Go World

2018-08-13 Thread Eyal
ust rely on locking in http2? > > [1] https://github.com/posener/h2conn/blob/master/conn.go#L18 > > On Sunday, August 12, 2018 at 4:40:03 PM UTC+2, Eyal wrote: >> >> Hi, >> You are welcome to read a blog post I wrote about a short experience with >> HTTP/2 and

[go-nuts] HTTP/2 Adventure in the Go World

2018-08-12 Thread Eyal
Hi, You are welcome to read a blog post I wrote about a short experience with HTTP/2 and Go. https://posener.github.io/http2/ Cheers, Eyal -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop

Re: [go-nuts] best practices of client middleware

2018-03-07 Thread eyal
In your tests in the round-trippers you do change the requests, as far as i can see. On Wed, Mar 7, 2018 at 10:13 AM Jakob Borg wrote: > On 7 Mar 2018, at 08:07, Eyal Posener wrote: > > > > Very Nice stuff - shame he didn't merge it. > > But I see that you changes th

[go-nuts] Re: best practices of client middleware

2018-03-06 Thread Eyal Posener
offered a PR on alice (which is a middleware library for the handlers) > that does that. It's essentially an application of the same pattern. We're > getting a lot of mileage for this. > > https://github.com/justinas/alice/pull/40 > > On Tuesday, March 6, 2018 at 6:41

[go-nuts] Re: best practices of client middleware

2018-03-06 Thread Eyal Posener
e that the standard library provides a beautiful way to have server middleware, but no way to have client middlewares? Cheers, Eyal On Tuesday, March 6, 2018 at 2:57:57 AM UTC+2, Bojan Delić wrote: > > As far as I am aware, there is very little information about best > practices re

[go-nuts] best practices of client middleware

2018-03-05 Thread Eyal Posener
uest, except for // consuming and closing the Request's Body. RoundTrip may // read fields of the request in a separate goroutine. Callers // should not mutate the request until the Response's Body has // been closed. Is there a standard way to do it? Thanks, Eyal --

[go-nuts] Re: http client for go-server-timing

2018-02-26 Thread Eyal Posener
://github.com/golang/go/issues/14468> about something similar to my problem. On Monday, February 26, 2018 at 5:56:28 PM UTC+2, matthe...@gmail.com wrote: > > Hi Eyal, here’s a code review. > > Perhaps there’s a simpler name? Something like “timing.Timer” would look > be

[go-nuts] http client for go-server-timing

2018-02-26 Thread Eyal Posener
nd B called C, you'll get all the information in the response, assuming all the servers used the middleware and the timing client. - Customize timing headers according to the request, response and error of the HTTP round trip. Would love to hear your feedback about it. Cheer

[go-nuts] "Try Go" in golang.org stopped working properly?

2018-01-27 Thread Eyal Posener
When I "Run", can't see the proper output, just "Program exited". Only after changing "Hello World" to another example and then back to "Hello World" I see the right output: Hello, 世界 Program exited. -- You received this message because you are subscribed to the Google Groups "golang-nuts" gr

[go-nuts] Be Careful with Table Driven Tests and t.Parallel()

2018-01-13 Thread Eyal Posener
Hi, A small talk about table driven tests and t.Parallel - it is dangerous! https://gist.github.com/posener/92a55c4cd441fc5e5e85f27bca008721 -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving email

[go-nuts] Re: [ANN] A Typed ORM Library

2017-12-23 Thread Eyal Posener
Nice stuff Alexey! thanks for this link, haven't seen it so far. Seems like we both got frustrated from the same issues with existing solutions :-) We took pretty different approaches to solve the typed-ORM problem though. The reform library has a larger run-time content, and keeps the generated

[go-nuts] Re: [ANN] A Typed ORM Library

2017-12-22 Thread Eyal Posener
Hi Tamas, Thanks for the link, haven't seen that tool. Actually, as I understand, it is exactly the opposite, xo generates go code from SQL database. A comparable tool I found is https://github.com/relops/sqlc. On Friday, December 22, 2017 at 10:49:37 PM UTC+2, Tamás Gulácsi wrote: > > Have you s

[go-nuts] [ANN] A Typed ORM Library

2017-12-22 Thread Eyal Posener
on, add examples, improve wiki. * Add tests. Please visit https://github.com/posener/orm, star, and contribute. And please, your opinion about it is appreciated! Cheers, Eyal -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsub

[go-nuts] Story: writing scripts in Go

2017-09-08 Thread Eyal Posener
Hi, I wrote a story about my experience in trying to write scripts in Go <https://gist.github.com/posener/73ffd326d88483df6b1cb66e8ed1e0bd>. Would love your opinion about it! Please comment in the gist itself, and not here. Cheers, Eyal -- You received this message because you are subscri

[go-nuts] Function Failure Reporting: Error or OK bool

2017-08-01 Thread Eyal Posener
An article about the different Go conventions of function failure reporting https://gist.github.com/posener/a303becac35835ad7bf5e15fe061893e Enjoy! :-) -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop rece

[go-nuts] Re: bash completion for flag package

2017-05-23 Thread Eyal Posener
No subcommand options :-) On Wednesday, May 24, 2017 at 3:21:23 AM UTC+3, Will Faught wrote: > > Can it complete subcommands? > > By the way, there's a small syntax error in the readme example: > []string{"work", "dring} > > On Tuesday, May 23, 2017

[go-nuts] bash completion for flag package

2017-05-23 Thread Eyal Posener
omplete anything (which is fine) and additional flag types can complete all sort of stuff. Please let me know your opinion about it. Cheers, Eyal -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and sto

[go-nuts] Re: New fully featured bash completion for go - written in go

2017-05-15 Thread Eyal Posener
The right installation commands are: go get github.com/posener/complete/gocomplete gocomplete -install You can also view the code in https://github.com/posener/complete On Saturday, May 13, 2017 at 11:29:47 AM UTC+3, Eyal Posener wrote: > > Simple to install (Assuming GOPATH and PA

Re: [go-nuts] New fully featured bash completion for go - written in go

2017-05-14 Thread Eyal Posener
Sure, open an issue, I'll fix that On Sunday, May 14, 2017 at 10:30:57 AM UTC+3, Frank Schröder wrote: > > It's not how other completions work, it's redundant and makes it harder to > read. > > Frank Schröder > > > On 14. May 2017, at 09:04, Eyal Pose

Re: [go-nuts] New fully featured bash completion for go - written in go

2017-05-14 Thread Eyal Posener
directories are completed with the `./` prefix, Does it make any problems? > > Eg consul agent -server -data-dir ./data > > Frank Schröder > > On 14. May 2017, at 07:46, Eyal Posener > > wrote: > > Frank, sweet! > > Notice that you can build custom comple

Re: [go-nuts] New fully featured bash completion for go - written in go

2017-05-13 Thread Eyal Posener
Frank, sweet! Notice that you can build custom completions, such as completing agent names in consul exec -node and service names after -service and so on. Also, you may suggest to add this code to the main consul repo. On Sunday, May 14, 2017 at 3:58:37 AM UTC+3, Frank Schröder wrote: > > Thi

Re: [go-nuts] New fully featured bash completion for go - written in go

2017-05-13 Thread Eyal Posener
ich does not need to be changed, and is added when you type `gocomplete -install`. > > It seems useful to have some Go completions (e.g. go in == go > install) available as part of distro packages. > > On Sat, May 13, 2017 at 1:29 AM, Eyal Posener > wrote: > >> Simple t

[go-nuts] New fully featured bash completion for go - written in go

2017-05-13 Thread Eyal Posener
Simple to install (Assuming GOPATH and PATH are correct): go install github.com/posener/complete/gocomplete gocomplete -install Features: - Complete go command, sub commands and flags. - Complete package names, .go files and ellipsis when necessary. - Complete test names after -run fla

Re: [go-nuts] uint type safety in go

2017-03-14 Thread Eyal Posener
Thanks for the answer. Very interesting. About the run time cost, does go always prefer safety over efficiency? or there is some kind of delicate balance between the two? On Tuesday, March 14, 2017 at 4:12:31 PM UTC+2, Ian Lance Taylor wrote: > > On Tue, Mar 14, 2017 at 6:48 AM, Eyal P

[go-nuts] uint type safety in go

2017-03-14 Thread Eyal Posener
of?) So my question is: why does go allow that, and for example panics on index out of range of an array? Doesn't it make sense that it also should panic in this case? Cheers, Eyal -- You received this message because you are subscribed to the Google Groups "golang-nuts&