Re: [go-nuts] Re: Build management mechanism for go lang

2020-05-27 Thread Chashika Weerathunga
Thank you @Henrik. I will try this. On Wednesday, May 27, 2020 at 12:22:40 PM UTC+5:30, Henrik Johansson wrote: > > I usually use make for that in combination with Goreleaser > https://github.com/goreleaser/goreleaser/ . > > > On Wed, May 27, 2020 at 7:18 AM Chashika Weerathunga > wrote: > >> go

[go-nuts] Does errgroup kills non_error_gouroutines

2020-05-27 Thread Amarjeet Anand
Code from https://pkg.go.dev/golang.org/x/sync/errgroup?tab=doc var g errgroup.Group var urls = []string{ "http://www.golang.org/";, "http://www.google.com/";, "http://www.somestupidname.com/";, } for _, url := range urls { url := url g.Go(func() error {

Re: [go-nuts] Trying to port Go to HPE NonStop x86 - Need some guidance

2020-05-27 Thread Randall Becker
We've gotten nowhere on this despite trying. Installing GO on windows went fine, based on what Ian suggested, but specifying GOOS=nsx fails immediately as being unrecognized (rather obvious). The archictture is not a powerPC, so I'm not sure why I would start there - it is a big-endian x86. On

[go-nuts] Re: I made History + Diff command to test automation tool by golang. Are you interesting this tool?

2020-05-27 Thread 加藤泰隆
I sent suddenly message. oops sorry! I didn't write detail point of evaluate. Can you look this tool again? 1. If feature be add, what you want to add feature? 2. Is there a tool similar to this? I want to use it as a reference. 3. Are you want to use similar tool? (I want to make it if possible)

[go-nuts] Does errgroup kills non_error_gouroutines

2020-05-27 Thread Tamás Gulácsi
errgroup does not terminate. But will signal the (sub)context returned by WithContext when any goroutine returns with an error. So if your functions handle the context cancelation by exiting, then you can cancel other goroutines. I asvice using such sub context with requests, too. -- You rece

Re: [go-nuts] Does errgroup kills non_error_gouroutines

2020-05-27 Thread Amarjeet Anand
Thanks for your response. Got it. On Wed, 27 May, 2020, 6:22 PM Tamás Gulácsi, wrote: > errgroup does not terminate. > But will signal the (sub)context returned by WithContext when any > goroutine returns with an error. > > So if your functions handle the context cancelation by exiting, then you

Re: [go-nuts] Failed to build gollvm in a docker container

2020-05-27 Thread Yuan Ting
Thank you for your guidance, now I can successfully compile and link gollvm by setting CMAKE_C_FLAGS="-fcf-protection=none". But after installing gollvm, there is still a weird problem: root@a78010e8da5d:~# go version go: symbol lookup error: /root/llvm-project/install-release/lib64/libgo.so.11

[go-nuts] Re: Failed to build gollvm in a docker container

2020-05-27 Thread Yuan Ting
Yes, you are right. The problems I have encountered so far are not related to the container environment. On Wednesday, May 27, 2020 at 10:20:21 AM UTC+8, eric fang wrote: > > I have been building Gollvm in a container, I can build it successfully no > matter on amd64 and arm64. But the ld.gold e

Re: [go-nuts] Failed to build gollvm in a docker container

2020-05-27 Thread 'Than McIntosh' via golang-nuts
>> I can successfully compile and link gollvm by setting CMAKE_C_FLAGS="-fcf-protection=none". The manual override of CMAKE_C_FLAGS shouldn't be needed, if you rerun cmake from a clean slate (removing the CMakeCache.txt, etc) it should detect that "-fcf-protection=branch" is hard-wired on, and wi

[go-nuts] I am facing goroutine leak issue. I am using cloudfoundary goclient libary to do some operations - Create service/Lastoperation/Update/Delete service instance.

2020-05-27 Thread raje . g . 995
goroutine profile: total 12 3 @ 0x1032760 0x10420bb 0x1309343 0x105fc71 # 0x1309342 net/http.(*persistConn).writeLoop+0x122 /usr/local/go/src/net/http/transport.go:2210 2 @ 0x1032760 0x10420bb 0x1308069 0x105fc71 # 0x1308068 net/http.(*persistConn).readLoop+0x998 /usr/

[go-nuts] [HELP] Install golang.org/x/tools/present successful but cannot find the binary

2020-05-27 Thread Gede Pentium
I've tried to install the *golang.org/x/tools/present*, but still cannot find the *present* binary in $GOPATH/bin Command: *go get -u -v golang.org/x/tools/present* There is no error in the installation, even after adding *-v* flag there is no error go version *go1.14.3* darwin/amd64 My ./bas

[go-nuts] ldflags="-s -w" vs strip

2020-05-27 Thread X Xiao
what's the difference between `go build -ldflags="-s -w"` and `go build` plus `strip myBinary`? it seems their result is different, sometimes running `strip` gives me smaller size, then why bother with ldflags? -- You received this message because you are subscribed to the Google Groups "golang-

[go-nuts] C to Go calls taking a long time - is this cgo overhead or my mistake?

2020-05-27 Thread Tom Larsen
I am attempting to build a Golang SDK for the Alteryx analytic application. Alteryx provides a C API for interacting with the engine, so I thought I would use cgo to build a bridge between Alteryx and Go. The basic flow-of-control looks something like this: 1. The engine pushes a record of

Re: [go-nuts] Re: What's the best IDE for golang?

2020-05-27 Thread arrkwen
hello, i have a problem that publish in here when i start using vscode to debug my go programe, i tried to modify the launch.json but no option named console, so i don't how to do, c

Re: [go-nuts] [HELP] Install golang.org/x/tools/present successful but cannot find the binary

2020-05-27 Thread Sebastien Binet
hi, golang.org/x/tools/present is the package. golang.org/x/tools/cmd/present is the command. you should install the command :) (which will in turn compile and install the package under the cover). hth, -s ‐‐‐ Original Message ‐‐‐ On Wednesday, May 27, 2020 7:05 AM, Gede Pentium wrot

Re: [go-nuts] [HELP] Install golang.org/x/tools/present successful but cannot find the binary

2020-05-27 Thread gede . pentium
Hi Sebastien, Thanks for the answer. Yes I just realised I was installing the package instead of the command. It works now :+1: On Thursday, May 28, 2020 at 1:16:00 AM UTC+8, Sebastien Binet wrote: > > hi, > > golang.org/x/tools/present is the package. > golang.org/x/tools/cmd/present is the co

Re: [go-nuts] Re: What's the best IDE for golang?

2020-05-27 Thread Kevin Chadwick
On 2020-05-27 09:13, arrk...@gmail.com wrote: > Visual Studio Code + https://marketplace.visualstudio.com/items/lukehoban.Go > is absolutely the > best > right now. As I recently renamed my template files, I will add. If you use vscode th

[go-nuts] Best practice for Database Open and Close connection

2020-05-27 Thread srikanth c
what is the best practice when we are using database\sql package for sql.Open and db.close(). I have scenario where i have to multiple function and each function is responsible to hit the database and fetch the data. In this case do we need write sql.open() and db.close() in each of those fun

Re: [go-nuts] Best practice for Database Open and Close connection

2020-05-27 Thread Marcin Romaszewicz
Behind the scenes, DB is actually a connection pool, not a single connection, which will open new connections when you need them. In our services - which do a LOT of DB work, we only open a single sql.DB connection and share it among all our handlers. Whenever a handler does a db.Whatever, the db

Re: [go-nuts] C to Go calls taking a long time - is this cgo overhead or my mistake?

2020-05-27 Thread Ian Lance Taylor
On Wed, May 27, 2020 at 10:08 AM Tom Larsen wrote: > > I am attempting to build a Golang SDK for the Alteryx analytic application. > Alteryx provides a C API for interacting with the engine, so I thought I > would use cgo to build a bridge between Alteryx and Go. > > The basic flow-of-control l

Re: [go-nuts] ldflags="-s -w" vs strip

2020-05-27 Thread Ian Lance Taylor
On Wed, May 27, 2020 at 10:08 AM X Xiao wrote: > > what's the difference between `go build -ldflags="-s -w"` and `go build` plus > `strip myBinary`? it seems their result is different, sometimes running > `strip` gives me smaller size, then why bother with ldflags? I just tried a simple hello,

Re: [go-nuts] C to Go calls taking a long time - is this cgo overhead or my mistake?

2020-05-27 Thread Tom Larsen
Thanks Ian, no need to apologize, I know this stuff is hard. I'll adjust my approach and see if I can conjure up enough working C code to try buffering the incoming data, and then call into Go in batches. Even buffering as few as 10 records at a time should significantly speed up the executio

[go-nuts] Re: Getting 410 error from https://sum.golang.org/lookup/github.com for a private github repo

2020-05-27 Thread James Mackerel
You may try: export *GONOSUMDB*="github.com/mycompany/*,github.com/secret/*" to disable sum check for some libraries. But try **not** to do this: > $export GOSUMDB=off or you may face security issue. -- You received this message because you are subscribed to the Google Groups "golang-nuts"

Re: [go-nuts] Failed to build gollvm in a docker container

2020-05-27 Thread Yuan Ting
Thanks for your correction, overriding CMAKE_C_FLAGS and CMAKE_ASM_FLAGS with "-fcf-protection=none" works for me. I also try to build gollvm from a clean slate (by recreating a build area and rerun cmake without overriding CMAKE_C_FLAGS and CMAKE_ASM_FLAGS). However, I still failed to build gol