Re: [go-nuts] The "leave "if err != nil" alone?" anti-proposal

2019-07-13 Thread roger peppe
On Fri, 12 Jul 2019, 07:22 Sam Whited, wrote: > > > On July 12, 2019 4:35:54 AM UTC, Andrey Tcherepanov < > xnow4fippy...@sneakemail.com> wrote: > >What these guys are proposing in that paper would be closer to > >(Go-style) > >func f() (v value | e error) { ... } > > > >(where "|" could be read

Re: [go-nuts] "net/url" HTTP Query Parameter without value

2019-07-13 Thread Fabrice Vaillant
I think this can be seen by accesing the map directly _, ok := u.Query()["query2"] // will be true _, ok := u.Query()["query3"] // isn't Fabrice On 14/07/2019 06:55, i...@ecnepsnai.com wrote: The URI RFC is pretty sparse when it comes to query parameters, but doesn't mandate that queries must

[go-nuts] "net/url" HTTP Query Parameter without value

2019-07-13 Thread ian
The URI RFC is pretty sparse when it comes to query parameters, but doesn't mandate that queries must have values, meaning that this is a valid URI: "https://example.com/?query1=value1&query2"; But the net/url package does not provide an easy way to see that "query2" is present in the URL throu

[go-nuts] Re: Not receiving email digests

2019-07-13 Thread amr
I also - this is the second night in a row that I have received the summary, as well as two during the day (at the same time) after temporary fix put in place. Thanks Ian. On Saturday, 13 July 2019 08:14:09 UTC+1, HaWe wrote: > > Seems to be working again. Got two digests yesterday and another o

Re: [go-nuts] Let's play

2019-07-13 Thread Skip Tavakkolian
If your security depends on you not clicking on hyperlinks, you don't have security. On Fri, Jul 12, 2019, 10:39 AM Marvin Renich wrote: > * Ali Hassan [190712 12:56]: > > > > If you curious about check out the link below > > > https://koohinoorgo.blogspot.com/2019/07/methods-bind-to-special-ty

Re: [go-nuts] listen port auto allocation questions

2019-07-13 Thread Vasiliy Tolstov
вс, 14 июл. 2019 г. в 00:30, Andrew Pillar : > > > How can i'm avoid such errors and not specify ports by hand? > Perhaps you could use some kind of central store for storing the most > recently used port? Simply take that port from the store, increment it, > and place it back into the store for t

Re: [go-nuts] listen port auto allocation questions

2019-07-13 Thread Andrew Pillar
> How can i'm avoid such errors and not specify ports by hand? Perhaps you could use some kind of central store for storing the most recently used port? Simply take that port from the store, increment it, and place it back into the store for the next micro-service to use. I think etcd [1], may be

[go-nuts] listen port auto allocation questions

2019-07-13 Thread Vasiliy Tolstov
Hi. I have busy system with more then 2 ports in use. I need to run 20-50 microservices and each of them need to listen tcp port. I want to use listen port auto allocation by specify as listen port :0 Sometimes i have errors like already listening on []:22925 that happened because port already

[go-nuts] Re: Go NaCl and C NaCl/libsodium

2019-07-13 Thread B Carr
Okay, I think I understand now. Ian intimates that support for "native client" is going away after Go v1.13. But support for the crypto/nacl package is remaining. Have I got that right? Thanks for explaining. -- You received this message because you are subscribed to the Google Groups "golan

Re: [go-nuts] Generating LSP protocol Go types

2019-07-13 Thread Paul Jolly
Just to add to Peter's response. The issue tracking making these packages non-internal is https://github.com/golang/go/issues/31080 FWIW, a number of people (myself included) simply clone the internal packages for our own purposes. Here are those packages cloned, with import paths changed: https

Re: [go-nuts] Some thoughts on query building in Go

2019-07-13 Thread Marcin Romaszewicz
I think that query builders are nice to have and proofs of concept are simple for simple queries, but the moment you need to leave the simple query domain and do something a little more complicated, things start to fall apart. As an example, say you want to store a struct in a database which contai

Re: [go-nuts] How to store the address of C struct on Go side in an array (cgo)

2019-07-13 Thread Ian Lance Taylor
On Sat, Jul 13, 2019, 1:20 AM Nitish Saboo wrote: > Hi Ian, > > Apologies for not being very descriptive with the issue.I will try to be > more clear from next time. > Can you please clarify the following that you had mentioned in the > previous conversation of this email: > > > 3)Is it possible

Re: [go-nuts] Generating LSP protocol Go types

2019-07-13 Thread 温博格
I'm responsible for some of that code but other than that, I'm just giving my personal opinion. There's no fundamental reason it couldn't be public, but, 1. They change all the time (weekly for some of it, more slowly for tsprotocol.go, which follows the Microsoft code) 2. They are adapted to the

Re: [go-nuts] Go NaCl and C NaCl/libsodium

2019-07-13 Thread Ian Lance Taylor
On Fri, Jul 12, 2019, 9:48 PM Dan Kortschak wrote: > Different type of salt here. This is Networking and Cryptography > library, not Native Client. > Ah, sorry. Ian On Fri, 2019-07-12 at 21:33 -0700, Ian Lance Taylor wrote: > > On Fri, Jul 12, 2019 at 9:28 PM mike wrote: > > > > > > Does any

Re: [go-nuts] Go NaCl and C NaCl/libsodium

2019-07-13 Thread Wojciech S. Czarnecki
On Fri, 12 Jul 2019 20:49:58 -0700 (PDT) mike wrote: > Does anyone have any sample code which shows interoperability between Go's > golang.org/x/crypto/nacl/box and C's NaCl or libsodium? I have been having > trouble boxing with Go and opening with NaCl (and vice versa). > Mike Once upon a tim

[go-nuts] Generating LSP protocol Go types

2019-07-13 Thread arnodel
Hi there, I am trying to write a Go client for gopls. Ideally I would like to be able to to import a package that defines Go types for all the messages that can be sent to / received from the server, which is something that obviously the gopls server also has to do. Unfortunately the protocol

[go-nuts] Some thoughts on query building in Go

2019-07-13 Thread Andrew Pillar
I put together a blog post exploring some of the approaches that could be taken for idiomatic query building in Go. The Tl;DR of it is this: First class functions are an idiomatic way of doing SQL query building in Go. Check out the repository containing some example code I wrote testing this out:

Re: [go-nuts] Go NaCl and C NaCl/libsodium

2019-07-13 Thread B Carr
Ugh. Why is that? What is the recommended replacement? On Friday, July 12, 2019 at 10:34:10 PM UTC-6, Ian Lance Taylor wrote: > > > I'm just replying to make sure that you know > that we are dropping NaCl support from Go after the 1.13 release. > > Ian > -- You received this message because

[go-nuts] Re: Go NaCl and C NaCl/libsodium

2019-07-13 Thread Manlio Perillo
On Saturday, July 13, 2019 at 6:28:25 AM UTC+2, mike wrote: > > Does anyone have any sample code which shows interoperability between Go's > golang.org/x/crypto/nacl/box and C's NaCl or libsodium? I have been > having trouble boxing with Go and opening with NaCl (and vice versa). I > have used N

Re: [go-nuts] How to store the address of C struct on Go side in an array (cgo)

2019-07-13 Thread fgergo
On 7/13/19, Nitish Saboo wrote: > Hi Ian, > > Apologies for not being very descriptive with the issue.I will try to be > more clear from next time. > Can you please clarify the following that you had mentioned in the previous > conversation of this email: > >> 3)Is it possible that one Go routine

Re: [go-nuts] How to store the address of C struct on Go side in an array (cgo)

2019-07-13 Thread Nitish Saboo
Hi Ian, Apologies for not being very descriptive with the issue.I will try to be more clear from next time. Can you please clarify the following that you had mentioned in the previous conversation of this email: > 3)Is it possible that one Go routine has already freed up the address that the othe

[go-nuts] Re: Not receiving email digests

2019-07-13 Thread HaWe
Seems to be working again. Got two digests yesterday and another one thin night. -- 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...@googlegr