Re: [go-nuts] OS-threads and what they do

2016-08-23 Thread Lars Kulseng
I have read some discussion on the release of OS-threads and it seems like a difficult problem to solve. I don't think this comes up as a problem too often though. Perhaps in very resource-limited systems? tirsdag 23. august 2016 23.39.28 UTC+2 skrev Dave Cheney følgende: > > Approximately yes.

Re: [go-nuts] how to resolve the warning about composite literal uses unkeyed fields .

2016-08-23 Thread tommy xiao
Thanks Matt 2016-08-23 9:56 GMT+08:00 Matt Harden : > cluster.ImageFilterOptions has an embedded field of type > types.ImageListOptions. When fields are embedded, the field name is set to > the type. So you can write: > > groupImages := make(map[string]apitypes.Image) > opts := cluster.ImageFilte

Re: [go-nuts] ListenAndServe without alert

2016-08-23 Thread Joe Blue
The localhost:8080 fixed it. No alert. Thanks :) On Wed, 24 Aug 2016, 01:33 Matt Harden, wrote: > Is this on Windows? Go itself doesn't generate any alerts like this. It's > likely that your firewall or antivirus software is doing that. You may have > to figure out how to configure them to allo

Re: [go-nuts] (*TCPConn).SetNoPush?

2016-08-23 Thread Matt Harden
The golang.org/x/net/ipv4 package obtains the connection's file descriptor by using reflection ( https://github.com/golang/net/blob/master/ipv4/helper_unix.go). Once you have that you can perform any system calls you might need on it. On Tue, Aug 23, 2016 at 8:07 PM Jingcheng Zhang wrote: > Then

Re: [go-nuts] (*TCPConn).SetNoPush?

2016-08-23 Thread Jingcheng Zhang
Then I'll make a try. As far as I know, Linux supports TCP_CORK, FreeBSD supports TCP_NOPUSH, OpenBSD and NetBSD seem not having this option. Currently I have no idea of Darwin, Plan 9 and Windows. I'm curious on how to add this support into golang.org/x/net, as this is a net.(*TCPConn) method.

Re: [go-nuts] Re: Golang upgrade from 1.5 to 1.7.2

2016-08-23 Thread Jeffrey
+1 https://github.com/samuel/go-zookeeper. already used in PRO env. 在 2016年8月24日星期三 UTC+8上午7:27:56,Matt Harden写道: > > You're right of course. I was thinking of > https://github.com/samuel/go-zookeeper. > > On Tue, Aug 23, 2016 at 4:04 PM Prateek Gaur > wrote: > >> BTW this thing worked fine in

Re: [go-nuts] Re: Why a **T value can't call methods of *T and T if a *T value can call methods of T?

2016-08-23 Thread T L
On Tuesday, August 23, 2016 at 9:09:34 PM UTC+8, Ian Lance Taylor wrote: > > On Mon, Aug 22, 2016 at 10:37 PM, T L > > wrote: > > > > On Tuesday, August 23, 2016 at 1:28:03 PM UTC+8, T L wrote: > >> > >> Looks this question can be stated as "why can't named pointer types > have > >> method

Re: [go-nuts] ListenAndServe without alert

2016-08-23 Thread Matt Harden
Is this on Windows? Go itself doesn't generate any alerts like this. It's likely that your firewall or antivirus software is doing that. You may have to figure out how to configure them to allow it. Another thing to consider is, since the client and server are running on the same machine, it's bet

Re: [go-nuts] Re: Golang upgrade from 1.5 to 1.7.2

2016-08-23 Thread Matt Harden
You're right of course. I was thinking of https://github.com/samuel/go-zookeeper. On Tue, Aug 23, 2016 at 4:04 PM Prateek Gaur wrote: > BTW this thing worked fine in 1.5.2 version of go linker. > > > On Monday, August 22, 2016 at 12:20:38 PM UTC-7, Prateek Gaur wrote: > >> In order to use one

[go-nuts] Re: Golang upgrade from 1.5 to 1.7.2

2016-08-23 Thread Prateek Gaur
BTW this thing worked fine in 1.5.2 version of go linker. On Monday, August 22, 2016 at 12:20:38 PM UTC-7, Prateek Gaur wrote: > > In order to use one of the go > packages I updates my golang version from 1.5.2 to 1.7. > > But after update my go binaries s

[go-nuts] Re: Golang upgrade from 1.5 to 1.7.2

2016-08-23 Thread Prateek Gaur
Actually gozk does use cgo. Check here . gozk is a wrapper on top of c client which is a wrapper on top of java code. Not if we check the symbols present in c client of zookeeper, we'll see : 204: 0001313f 132 FUNCLOCAL DEFAULT

[go-nuts] ListenAndServe without alert

2016-08-23 Thread Joe Blue
Hey everyone I am building a Desktop application with golang. The Frontend is Electron, and the Backend if Golang. They talk over http. I have managed to combine the two into a single compile & run, but i need the backend server to NOT alert when it starts at the "http.ListenAndServe(":8080", n

Re: [go-nuts] OS-threads and what they do

2016-08-23 Thread Dave Cheney
Approximately yes. However threads are not reclaimed by the runtime, so the number of threads in a go program represents a high water mark, not necessarily the current sum of active goroutines plus blocked syscall/cgo operations. -- You received this message because you are subscribed to the G

Re: [go-nuts] Re: Accessing Ms SQL Server with Go

2016-08-23 Thread Michael-John Turner
On Tue, Aug 23, 2016 at 01:54:50PM -0400, Tong Sun wrote: >Does it support trusted connection at all (no user/pass)? I've been >looking all over the places but haven't found the answer yet. The docs suggest so: "user id" - enter the SQL Server Authentication user id or the Windows Auth

Re: [go-nuts] Re: inconsistent behaviour of rate.Limiter.WaitN

2016-08-23 Thread Manlio Perillo
Thanks, done: https://github.com/golang/go/issues/16854 The issue does not follow the guidelines for contributing, since I think it does not apply for the sub-repositories. I hope it is ok. Manlio Il giorno martedì 23 agosto 2016 20:33:56 UTC+2, Matt Harden ha scritto: > > That looks like a b

Re: [go-nuts] Re: inconsistent behaviour of rate.Limiter.WaitN

2016-08-23 Thread Matt Harden
That looks like a bug. I'd suggest submitting an issue. I think the check at the beginning of WaitN should just be removed, as the burst limit will be accounted for in reserveN later. On Tue, Aug 23, 2016 at 6:32 AM Manlio Perillo wrote: > Il giorno martedì 23 agosto 2016 12:03:37 UTC+2, Sokolov

Re: [go-nuts] Invalid JSON document from 'go list -json std'

2016-08-23 Thread Matt Harden
Perhaps a quick note in the doc that this produces a stream of 0 or more JSON documents would be helpful? I don't actually think the current doc is wrong; the data is printed in "JSON format", it's just not a single JSON document. On Tue, Aug 23, 2016 at 6:22 AM Jim Ancona wrote: > This is a pre

Re: [go-nuts] github project - https://github.com/Tfindelkind/automation - How to compile and install each package when using "go get github.com/Tfindelkind/automation"

2016-08-23 Thread Thomas Findelkind
That worked great. Thanks a lot! Am Montag, 22. August 2016 16:46:51 UTC+2 schrieb Ian Davis: > > > On Mon, Aug 22, 2016, at 07:43 AM, tfind...@gmail.com wrote: > > > > So what I want to achieve is. > > A windows user with go installed types: > > go get github.com/Tfindelkind/automation > > Aft

Re: [go-nuts] Re: Accessing Ms SQL Server with Go

2016-08-23 Thread Tong Sun
Latest commit 9 days ago. Great. Thanks! Does it support trusted connection at all (no user/pass)? I've been looking all over the places but haven't found the answer yet. Thx. On Tue, Aug 23, 2016 at 1:41 PM, wrote: > I have used: https://github.com/denisenkom/go-mssqldb > > > On Tuesday, Augu

Re: [go-nuts] Re: Accessing Ms SQL Server with Go

2016-08-23 Thread Tong Sun
Latest commit 9 days ago. Thanks! On Tue, Aug 23, 2016 at 1:41 PM, wrote: > I have used: https://github.com/denisenkom/go-mssqldb > > > On Tuesday, August 23, 2016 at 6:28:10 PM UTC+2, Tong Sun wrote: >> >> Hi, >> >> What's the widely used, most-actively-maintained GO library to access >> (R/W)

[go-nuts] Re: Accessing Ms SQL Server with Go

2016-08-23 Thread gerald . stanje
I have used: https://github.com/denisenkom/go-mssqldb On Tuesday, August 23, 2016 at 6:28:10 PM UTC+2, Tong Sun wrote: > > Hi, > > What's the widely used, most-actively-maintained GO library to access > (R/W) Microsoft SQL Server? > > I know that Microsoft SQL Server has various methods to acces

Re: [go-nuts] Re: Why a **T value can't call methods of *T and T if a *T value can call methods of T?

2016-08-23 Thread T L
On Tuesday, August 23, 2016 at 9:09:34 PM UTC+8, Ian Lance Taylor wrote: > > On Mon, Aug 22, 2016 at 10:37 PM, T L > > wrote: > > > > On Tuesday, August 23, 2016 at 1:28:03 PM UTC+8, T L wrote: > >> > >> Looks this question can be stated as "why can't named pointer types > have > >> method

[go-nuts] Accessing Ms SQL Server with Go

2016-08-23 Thread Tong Sun
Hi, What's the widely used, most-actively-maintained GO library to access (R/W) Microsoft SQL Server? I know that Microsoft SQL Server has various methods to access ODBC/ADO, etc, and there are lots of GO libraries at different stages as well. So which one is the most widely used and most act

Re: [go-nuts] context: testing if an HTTP request was canceled

2016-08-23 Thread Manlio Perillo
Il giorno lunedì 22 agosto 2016 20:08:26 UTC+2, Ian Lance Taylor ha scritto: > > On Sun, Aug 21, 2016 at 9:53 AM, Manlio Perillo > > wrote: > > [...] > > The context package defines the Cancel error variable, that is returned > by > > Context.Err when the context is canceled. > > However the T

[go-nuts] Problem with httputil.NewSingleHostReverseProxy

2016-08-23 Thread io . chir0n
Hi there, Can anibody here point me what is wrong with my proxy? I can't access https sites. package main import ( "crypto/tls" "log" "net/http" "net/http/httputil" "net/url" ) func main() { urlProxy, _ := url.Parse("http://192.168.0.10:3128";) proxy := httputil.NewSingleHostRever

Re: [go-nuts] OS-threads and what they do

2016-08-23 Thread Lars Kulseng
Thank you for the clarification Ian. So to sum up: the reason for the number of threads being more than GOMAXPROCS, is that a thread has been in a syscall or blocking state, perhaps due to opening a file or some I/O operation, and the runtime has spawned a new OS-thread to maintain GOMAXPROCS-

[go-nuts] Re: inconsistent behaviour of rate.Limiter.WaitN

2016-08-23 Thread Manlio Perillo
Il giorno martedì 23 agosto 2016 12:03:37 UTC+2, Sokolov Yura ha scritto: > > What is rate.Limiter ? golang.org/x/time/rate Manlio -- 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

Re: [go-nuts] (*TCPConn).SetNoPush?

2016-08-23 Thread Ian Lance Taylor
On Tue, Aug 23, 2016 at 4:35 AM, Jingcheng Zhang wrote: > > I'm writing a network program which requires a call to SetNoPush() of > (*TCPConn), however it doesn't exist in current TCPConn type. > Any plan to implements this method? I have not heard of any plans to implement that. It's not portab

Re: [go-nuts] Re: Understanding go routine heap

2016-08-23 Thread Ian Lance Taylor
On Tue, Aug 23, 2016 at 3:14 AM, Yulrizka wrote: > > But the case here is indeed as Marvin explained, There is race condition. > But in my example, I make sure that wg done is to protect result pointer > before calling it to caller. > > with this structure some one could easily introduce a race co

Re: [go-nuts] Invalid JSON document from 'go list -json std'

2016-08-23 Thread Jim Ancona
This is a pretty common way of streaming JSON objects. See: https://en.wikipedia.org/wiki/JSON_Streaming But I agree that it's not part of the JSON standard, nor does it seem to be standardized anywhere else. On Mon, Aug 22, 2016 at 9:43 PM, Matt Harden wrote: > The output is not a valid (singl

Re: [go-nuts] OS-threads and what they do

2016-08-23 Thread Ian Lance Taylor
On Tue, Aug 23, 2016 at 1:54 AM, Lars Kulseng wrote: > > I have tried to find some onformation about how OS-threads are created, and > what their roles are. I know that this doesn't really matter in a lot of > cases since goroutines are multiplexed on top of OS-threads and they are > usually creat

Re: [go-nuts] Re: Why a **T value can't call methods of *T and T if a *T value can call methods of T?

2016-08-23 Thread Ian Lance Taylor
On Mon, Aug 22, 2016 at 10:37 PM, T L wrote: > > On Tuesday, August 23, 2016 at 1:28:03 PM UTC+8, T L wrote: >> >> Looks this question can be stated as "why can't named pointer types have >> methods?" > > > Just found this thread > https://groups.google.com/forum/#!topic/golang-nuts/Vhh5XOm96YI >

[go-nuts] (*TCPConn).SetNoPush?

2016-08-23 Thread Jingcheng Zhang
Hello, I'm writing a network program which requires a call to SetNoPush() of (*TCPConn), however it doesn't exist in current TCPConn type. Any plan to implements this method? Thanks, Jingcheng Zhang -- You received this message because you are subscribed to the Google Groups "golang-nuts" gr

[go-nuts] Re: Understanding go routine heap

2016-08-23 Thread Yulrizka
Ah sorry I've missed that in the email. On Tuesday, August 23, 2016 at 12:48:04 PM UTC+2, T L wrote: > > > > On Tuesday, August 23, 2016 at 6:14:19 PM UTC+8, Yulrizka wrote: >> >> Thank you for the explanation and the code sample >> >> But the case here is indeed as Marvin explained, There is race

[go-nuts] Re: Understanding go routine heap

2016-08-23 Thread T L
On Tuesday, August 23, 2016 at 6:14:19 PM UTC+8, Yulrizka wrote: > > Thank you for the explanation and the code sample > > But the case here is indeed as Marvin explained, There is race condition. > Marvin says there is no race condition in your start comment. > But in my example, I make sur

[go-nuts] Re: Understanding go routine heap

2016-08-23 Thread Yulrizka
Thank you for the explanation and the code sample But the case here is indeed as Marvin explained, There is race condition. But in my example, I make sure that wg done is to protect result pointer before calling it to caller. with this structure some one could easily introduce a race condition

[go-nuts] inconsistent behaviour of rate.Limiter.WaitN

2016-08-23 Thread Sokolov Yura
What is rate.Limiter ? -- 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

[go-nuts] OS-threads and what they do

2016-08-23 Thread Lars Kulseng
I have tried to find some onformation about how OS-threads are created, and what their roles are. I know that this doesn't really matter in a lot of cases since goroutines are multiplexed on top of OS-threads and they are usually created at startup of the program, but I'm just trying to underst