[go-nuts] Re: Missing test flags (coverpkg and covermode) while running test binary

2016-11-04 Thread Vivekanand SV
I tried few things and the following worked for me *go test -c -coverpkg=. -covermode=count -o=test_binary* *test_binary -test.coverprofile c.out* But the the same thing fails when there are more than one package passed to coverpkg flag with the error "*cannot use -c flag with multiple packages*

[go-nuts] Re: Missing test flags (coverpkg and covermode) while running test binary

2016-11-04 Thread Vivekanand SV
It worked. In my last try the multiple packages that I generated were not comma separated, once I fixed that everything worked fine. On Friday, 4 November 2016 14:50:00 UTC+5:30, Vivekanand SV wrote: > > I tried few things and the following worked for me > > *go test -c -coverpkg=. -covermode=co

Re: [go-nuts] Multiple-reader single-writer map access is safe ?

2016-11-04 Thread Michael Jones
刘桂祥, To be successful sharing changing data between multiple processes, threads, cores, or “goroutines” you must write programs that honor the physical reality of computing hardware. That reality is very subtle and unexpected when it comes to what is and is observed by memory readers and wri

Re: [go-nuts] Multiple-reader single-writer map access - is this lockless workaround safe?

2016-11-04 Thread adonovan via golang-nuts
On Thursday, 3 November 2016 23:54:46 UTC-4, 刘桂祥 wrote: > > sorry could you provide a complete example ? > > I try this but not find question > package main > > > import "time" > > > type T struct{ x int } > > > var global *T > > > func f() { > p := new(T) > p.x = 1 > global = p // "publish" th

[go-nuts] Re: Stalking people online for thought crimes! This is what the Go project has succumbed to!

2016-11-04 Thread prades . marq
> then labeling someone's thread as "bullying" (a pretty serious charge in todays climate). Well now the target of the latest witch-hunt /u/gernest_ has responded on /r/golang, the previous thread that I linked I quote "broke his heart" , so you can't deny something is definitely wrong here :

Re: [go-nuts] Re: Stalking people online for thought crimes! This is what the Go project has succumbed to!

2016-11-04 Thread 'Thomas Bushnell, BSG' via golang-nuts
This list doesn't need to be a place to copy /r/ to. Please refrain from public denunciations and speak privately with those you wish, and... Follow the code of conduct if you believe a more formal response is called for. Thomas On Fri, Nov 4, 2016, 6:17 AM wrote: > > then labeling someone's t

Re: [go-nuts] Multiple-reader single-writer map access is safe ?

2016-11-04 Thread Ian Lance Taylor
On Thu, Nov 3, 2016 at 11:30 PM, 刘桂祥 wrote: > >very thanks , I am unfamiliar with the cpu out-of-order execution , but > I doubt if my three line code is related ,it will reorder it ?? I want to be clear that the real problem is not out-of-order execution, it is memory ordering. On modern m

[go-nuts] pkg/sftp fails connecting (special char in user/pass)

2016-11-04 Thread Pontus Lundin
Hi! Having successfully connected to many sftp servers before now having problem with one a using password auth. ssh -vv yields debug1: Next authentication method: password password: The user and password contains a $ character, i have tried encode it '%24' and in plain text. If having pla

[go-nuts] What are the consequences of go install -ldflags "-s"

2016-11-04 Thread Nick Craig-Wood
I know I can build go binaries passing the `-s` flag to the linker to strip them and make them smaller. In my tests (with rclone) it makes it 60% of the size so a significant saving. I'd like to enable this for binaries I distribute to end users. go install -ldflags "-s" However what are the c

[go-nuts] Re: Tooling experience feedback

2016-11-04 Thread chhatoipritam
Incremental build support in `go build` would be much appreciated. AIUI, the only way to have incremental builds using standard go tools are through `go install`; but `go install` is not a compiler/linker/builder and it doesn't simply build a go project. Even if `go build` doesn't handle increm

Re: [go-nuts] What are the consequences of go install -ldflags "-s"

2016-11-04 Thread Ian Lance Taylor
On Fri, Nov 4, 2016 at 7:39 AM, Nick Craig-Wood wrote: > I know I can build go binaries passing the `-s` flag to the linker to > strip them and make them smaller. In my tests (with rclone) it makes it > 60% of the size so a significant saving. I'd like to enable this for > binaries I distribute t

Re: [go-nuts] Re: Tooling experience feedback

2016-11-04 Thread Ian Lance Taylor
On Fri, Nov 4, 2016 at 7:37 AM, wrote: > Incremental build support in `go build` would be much appreciated. > > AIUI, the only way to have incremental builds using standard go tools are > through `go install`; but `go install` is not a compiler/linker/builder and > it doesn't simply build a go pr

[go-nuts] Inserting Array into Postgresql Column

2016-11-04 Thread Kedarnag Mukanahallipatna
Hello Everyone. I am facing an issue when I am trying to insert an array into a column. The following is my request "route": [{"latitude":10.32, "longitude":11.23432}, {"latitude":20.234324, "longitude":30.34543}] I want to store this in 1 column called as Route. This is how my struct looks l

[go-nuts] New to golang and have problem with packages

2016-11-04 Thread Merzouki M'heni
Hy, everyone * - workSpace/src/tempConv : contains the main program (package main) - workSpace/src/tempConv/pkg : contains a file of functions that i want to use in main() (package tempConv) * in the main file i *import *the other package *(./tempConv)*, but it dose not work, *even though

Re: [go-nuts] What are the consequences of go install -ldflags "-s"

2016-11-04 Thread Nick Craig-Wood
On 04/11/16 14:55, Ian Lance Taylor wrote: > On Fri, Nov 4, 2016 at 7:39 AM, Nick Craig-Wood wrote: >> I know I can build go binaries passing the `-s` flag to the linker to >> strip them and make them smaller. In my tests (with rclone) it makes it >> 60% of the size so a significant saving. I'd l

Re: [go-nuts] New to golang and have problem with packages

2016-11-04 Thread Jan Mercl
On Fri, Nov 4, 2016 at 4:07 PM Merzouki M'heni wrote: Assuming $GOPATH is in this case something ending in `workspace`: To import a package located in `workSpace/src/tempConv/pkg` use `import "tempConv/pkg"`. -- -j -- You received this message because you are subscribed to the Google Grou

Re: [go-nuts] Re: Tooling experience feedback

2016-11-04 Thread Pritam Baral
On Fri, Nov 4, 2016 at 8:28 PM, Ian Lance Taylor wrote: > On Fri, Nov 4, 2016 at 7:37 AM, wrote: > > Incremental build support in `go build` would be much appreciated. > > > > AIUI, the only way to have incremental builds using standard go tools are > > through `go install`; but `go install` is

Re: [go-nuts] Re: Tooling experience feedback

2016-11-04 Thread Ian Lance Taylor
On Fri, Nov 4, 2016 at 8:15 AM, Pritam Baral wrote: > On Fri, Nov 4, 2016 at 8:28 PM, Ian Lance Taylor wrote: > >> `go build` takes a -o option that you can use to put the results where >> you please. > > Yes, I use that. But that's only `-o`. In my original comment about gcc's > `-o` I meant to

[go-nuts] Re: ActiveState seeking Go community feedback

2016-11-04 Thread Tong Sun
If you are talking about packaging, there is a newly established go packaging committee, or something alike, discussed here just a while ago. On Wednesday, November 2, 2016 at 12:53:23 PM UTC-4, je...@activestate.com wrote: > > Hi all, > > At ActiveState we see Go as one of the languages of th

[go-nuts] OS thread leak on ARM

2016-11-04 Thread David Sharp
I have a program that appears to be leaking OS threads on ARM (raspberry pi). Watching the number of goroutines using runtime.NumGoroutine() shows that they are staying mostly constant. But ps -eLf shows the number of threads gradually increasing as well as the resident and virtual memory use

Re: [go-nuts] pkg/sftp fails connecting (special char in user/pass)

2016-11-04 Thread Derbyshire, Drew
my advice: Don't use dollar signs. That's tempting fate, like using a quote or newline character. I suspect one of the values is being used in a shell context and being expanded. Why are they being used in the first place? On Fri, Nov 4, 2016 at 7:28 AM, Pontus Lundin wrote: > Hi! > > Having s

[go-nuts] Re: New to golang and have problem with packages

2016-11-04 Thread Nate Finch
make sure the thing you want to import is exported (i.e. starts with a capital letter). What is the exact error message you're getting? "Does not work" is fairly general, and makes it harder for us to help. On Friday, November 4, 2016 at 11:07:11 AM UTC-4, Merzouki M'heni wrote: > > Hy, everyo

Re: [go-nuts] pkg/sftp fails connecting (special char in user/pass)

2016-11-04 Thread Pontus Lundin
Hi! Thanks. I agree, that was my thinking as well..i just got it from the server/sftp provider. I dont think they are meant and used for anything special.. it just feels wired to be honest :/ Will try to change that to start with. Den fredag 4 november 2016 kl. 18:42:13 UTC+1 skrev Drew Derbyshi

Re: [go-nuts] Re: Stalking people online for thought crimes! This is what the Go project has succumbed to!

2016-11-04 Thread prades . marq
All I see here is nothing is done to moderate /r/golang despite threads being reported for harassment. What good is a code of conduct if it isn't enforced ? and when enforced , moderators have to come here to apologize for doing their jobs, like Sarah ? If you don't want me to bring /r/golang h

[go-nuts] Can't run golint recursively on a directory using

2016-11-04 Thread Om Sao
Hi All, I am new to Go lang and curious about the golint. When I am running golint on individual files, it's giving results perfectly. But when I am trying to run it recursively on a directory path given using "/..." It's giving error "Access is denied"

Re: [go-nuts] Re: Stalking people online for thought crimes! This is what the Go project has succumbed to!

2016-11-04 Thread 'Thomas Bushnell, BSG' via golang-nuts
If you believe there is an issue which is not being addressed properly, please use the procedure at https://golang.org/conduct#reporting. Thomas On Fri, Nov 4, 2016 at 12:22 PM wrote: > All I see here is nothing is done to moderate /r/golang despite threads > being reported for harassment. What

Re: [go-nuts] Re: Stalking people online for thought crimes! This is what the Go project has succumbed to!

2016-11-04 Thread Damian Gryski
On Friday, November 4, 2016 at 8:22:49 PM UTC+1, prade...@gmail.com wrote: > > All I see here is nothing is done to moderate /r/golang despite threads > being reported for harassment. What good is a code of conduct if it isn't > enforced ? and when enforced , moderators have to come here to apo

Re: [go-nuts] anyone using pkg-config on Windows?

2016-11-04 Thread Justin Israel
On Fri, 4 Nov 2016, 8:36 AM Russ Cox wrote: > We would like to fix the behavior of cgo invoking pkg-config on Windows, > for golang.org/issue/16455. From the failure in the report, it appears > that pkg-config --libs printed the actual text "C:/Program Files > (x86)/libgit2/lib" as part of its ou

[go-nuts] Re: pkg/sftp fails connecting (special char in user/pass)

2016-11-04 Thread Pontus Lundin
Now solved, was my misstake with walking some fs path that produced the unexpected error. Just walking and creating files at ~ solved it. Sorry sorry. The sftp package is solid and great! Den fredag 4 november 2016 kl. 15:28:43 UTC+1 skrev Pontus Lundin: > > Hi! > > Having successfully connected

[go-nuts] building rss aggregator (thousands of goroutines sleeps at the same time)

2016-11-04 Thread Marwan abdel moneim
i am building a web site that includes a rss aggregator now, the idea i have is making a goroutine for every rss feed that should learn by time when to update the feed these goroutines sleeps for a while then send job to some channel then go to sleep again so there could be a thousands of go

[go-nuts] Beautify XML

2016-11-04 Thread Tong Sun
How to beautify a given XML string in GO? The xml.MarshalIndent() only apply to a GO structure, not XML strings. Thanks -- 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

[go-nuts] Re: Beautify XML

2016-11-04 Thread C Banning
You can try: https://godoc.org/github.com/clbanning/mxj#BeautifyXml On Friday, November 4, 2016 at 3:32:24 PM UTC-6, Tong Sun wrote: > > How to beautify a given XML string in GO? > > The xml.MarshalIndent() only apply to a GO structure, not XML strings. > > Thanks > > -- You received this mess

Re: [go-nuts] Compiler level memory barrier in Go i.e. asm volatile("" : : : "memory")

2016-11-04 Thread tsuna
Follow up question, just to be sure: Do we then agree that if I see code like this: for { version := shmem.version // this reads a uint32 from shared memory doSomething() if version == shmem.version { break } } then this code is buggy because the Go compiler could re-orde

Re: [go-nuts] Compiler level memory barrier in Go i.e. asm volatile("" : : : "memory")

2016-11-04 Thread Ian Lance Taylor
On Fri, Nov 4, 2016 at 3:01 PM, tsuna wrote: > > Follow up question, just to be sure: > > Do we then agree that if I see code like this: > > for { > version := shmem.version // this reads a uint32 from shared memory > doSomething() > if version == shmem.version { > break >

RE: [go-nuts] Compiler level memory barrier in Go i.e. asm volatile("" : : : "memory")

2016-11-04 Thread John Souvestre
+1 Please note my new email address: j...@souvestre.com John John Souvestre - New Orleans LA -Original Message- From: Ian Lance Taylor [mailto:i...@golang.org] Sent: 2016 November 04, Fri 17:09 To: tsuna Cc: Rob Pike; John Souvestre; golang-nuts; Dmitry Vyukov Subject: Re: [go-nut

[go-nuts] Passing protos from C/C++ to go

2016-11-04 Thread 'Merouane Moakil' via golang-nuts
I want to use a c++ library that among many other things have a function that generates a proto object. MyProtoMessage GetMyProto() { MyProtoMessage p; ... return p; } Currently this method and its callers are all in C++. I want to call that same method from Go and want to get back the

[go-nuts] stop go run from printing "exit status 1"?

2016-11-04 Thread Nate Finch
If the script you run with go run returns a non-zero exit status, go run prints "exit status N" and itself then returns with exit code 1. Now, this seems like a double mistake - first off, the only time go run should print anything out is if it had some problem actually running the code, i.e. u

[go-nuts] OS thread leak on ARM

2016-11-04 Thread Dave Cheney
Are you able to post a piece of sampl code which reproduces the problem? -- 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.