Re: [go-nuts] How to lower listen backlog for tcp socket

2019-03-22 Thread Janne Snabb
st regards, Janne Snabb sn...@epipe.com On 22/03/2019 18.48, Wangbo wrote: I know Control func and syscall.SetsockoptInt(fd, syscall.AF_INET, syscall.SO_REUSEADDR, 1)  cat set reuseadd But how to adjust listen backlog since i never find socket options for it. Agniva De Sarker <mailto:ag

Re: [go-nuts] syscall.SendMsg/RecvMsg

2019-03-16 Thread Janne Snabb
existing solution instead of trying to reinvent the wheel? A simple google search returns this at the top: https://github.com/ftrvxmtrx/fd Janne Snabb sn...@epipe.com On 15/03/2019 20.12, sbezverk wrote: Hello, I am trying to pass a descriptor using syscall.SendMsg/RecvMsg and I noticed that inod

Re: [go-nuts] how to build golang program with a lower kernel requirement?

2018-12-01 Thread Janne Snabb
You are somehow confused. The kernel version requirement of some particular glibc version is not relevant. There is no problem. It works. See https://github.com/golang/go/wiki/MinimumRequirements for kernel version requirements. Hope this helps, Janne Snabb sn...@epipe.com On 30/11/2018

Re: [go-nuts] Determining latest released Go version

2018-11-21 Thread Janne Snabb
Thanks! I think programmers are more likely to stay consistent than web designers — thus this feels a bit better than scraping a web page. Janne Snabb sn...@epipe.com On 20/11/2018 22.06, Caleb Mingle wrote: Perhaps something built using these may work (sorting the go1* tags descending

Re: [go-nuts] Determining latest released Go version

2018-11-20 Thread Janne Snabb
Parsing HTML is exactly what I wanted to avoid doing :) but I haven't found any alternatives so far. For some reason https://api.github.com/repos/golang/go/releases does not return anything. It does work for other projects on Github. Janne Snabb sn...@epipe.com On 20/11/2018 03.51,

[go-nuts] Determining latest released Go version

2018-11-19 Thread Janne Snabb
and slow. Also scraping and parsing golang.org web site contents seems silly. I would like an URL which returns the latest released version number as text or as a redirect to the latest tarball or something similar. Does such thing exist? Any other ideas? -- Janne Snabb sn...@epipe.com

Re: [go-nuts] Go could really use a while statement

2018-05-13 Thread Janne Snabb
better than "var" and "mitähäh?" would be better than "if". Should the language also be changed to accommodate those feelings? Obviously not. Janne Snabb sn...@epipe.com -- You received this message because you are subscribed to the Google Groups "golang-nuts&qu

Re: [go-nuts] net.Conn not returning error upon Write after being closed from far side.

2018-04-10 Thread Janne Snabb
Your TCP FIN is still in transit or not yet processed by the other TCP stack when you issue the first write. TCP is not synchronous even if running on same host. Janne Snabb sn...@epipe.com On 2018-04-10 17:58, pierspowlesl...@gmail.com wrote: > Hi > > I'm trying to understand

Re: [go-nuts] Set a SAN otherName using `x509.CertificateRequest`

2017-04-24 Thread Janne Snabb
Yes, but not as easily as using DNSName. You need to add the extension "manually". Put it in ExtraExtensions of the template. See /usr/local/go/src/crypto/x509/x509.go functions buildExtensions and marshalSANs to see how to put it there. Janne Snabb sn...@epipe.com On 2017-04-24 1

Re: [go-nuts] Re: golang tour - floating point numbers

2017-04-16 Thread Janne Snabb
It does not do this. It would be nice in most cases if it did. But some times extra parenthesis are useful for making some formula easier to read. Janne Snabb sn...@epipe.com On 2017-04-15 01:36, Jesper Louis Andersen wrote: > If I remember correctly, you can just go wild and put in all

Re: [go-nuts] godoc: example wont show up

2017-03-06 Thread Janne Snabb
It seems it is because it is "package main". See $GOPATH/src/golang.org/x/tools/godoc/static/package.html template. "IsMain" is set if the package is called "main". Looks like there is no way to output examples in that case. Janne Snabb sn...@epipe.com On 2017-

Re: [go-nuts] Load public key from DER encoded certificate

2017-03-06 Thread Janne Snabb
You are trying to read a certificate with a function intended for reading a public key. Use x509.ParseCertificates instead. Janne Snabb sn...@epipe.com On 2017-03-06 16:39, 0x7bc77a wrote: > Hi, > > I would like to load the public key from a DER encoded certificate > >

Re: [go-nuts] godoc: example wont show up

2017-03-06 Thread Janne Snabb
example the following about the naming rules: https://blog.golang.org/examples#TOC_4. Janne Snabb sn...@epipe.com On 2017-03-06 17:35, mhhc...@gmail.com wrote: > Hi, > > in my package here, what did i do wrong so the ExampleMain won t show up ? > > https://github.com/mh-cbon

Re: [go-nuts] sqlEZ: the easiest way to use a SQL database

2017-03-05 Thread Janne Snabb
Looks similar to https://github.com/jmoiron/sqlx which is well established. Might be a good idea to add a short summary of differences/additional benefits compared to sqlx in README. Janne Snabb sn...@epipe.com On 2017-03-05 01:36, jmacwhyte wrote: > Hello all, > > After seeing a

Re: [go-nuts] API call fails

2017-02-17 Thread Janne Snabb
client. Janne Snabb sn...@epipe.com On 2017-02-17 16:38, Sovon Nath wrote: > Hi - I am trying to call a restful API using a certificate. The pem file > I have is of the format: > > -BEGIN RSA PRIVATE KEY- > > data is here > > -END RSA PRIVATE KEY- >

Re: [go-nuts] TLS server to save client certificates after a request is received

2017-02-15 Thread Janne Snabb
can just save c.Raw in a file if you prefer binary format. See https://gist.github.com/snabb/01c71af8cc9815e2fed68767bbb445af for complete example. Janne Snabb sn...@epipe.com On 2017-02-15 03:54, Naveen Shivegowda wrote: > Hi, > > I need to store the client certificate

Re: [go-nuts] Turning off nagle's algorithm for http.Client

2016-10-08 Thread Janne Snabb
In the http.Client that you use, specify your own Transport where you specify your own DialContext function which Dials first and then calls SetNoDelay on the connection before returning. Janne Snabb sn...@epipe.com On 2016-10-08 11:25, hay wrote: > Hi, > > I'm using http.Client t

Re: [go-nuts] why is my program retaining memory when len([]byte)>16384 ?

2016-07-03 Thread Janne Snabb
buffer modification, so immediate changes to the slice will affect the result of future reads. Janne Snabb sn...@epipe.com -- 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

Re: [go-nuts] golang poll/epoll/select

2016-06-25 Thread Janne Snabb
e the read is blocked. If you do not need to do something else, you do not need a goroutine. Just a plain and simple read loop. Janne Snabb sn...@epipe.com -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group