Re: [go-nuts] Distributed go testing (running "go test" as a client)

2020-10-26 Thread Ian Lance Taylor
On Mon, Oct 26, 2020 at 8:46 AM Craig Silverstein wrote: > > > You realize that the flag "-count 1" disable the cache, right? > > Well, it disables *a* cache. The docs don't make it clear, but it > seems like it only disables the test-cache. I don't see why it would > affect the build caches --

[go-nuts] Re: Windows "syscalls" and Go pointers

2020-10-26 Thread peterGo
"I want to call RegisterClassW which takes a pointer to WNDCLASSW as its parameter. One of the members of WNDCLASSW is lpszClassName of LPCWSTR type (UTF-16 string). This puzzled me as to how I should approach allocating storage for that string?" Win32 API: RegisterClassW function:

Re: [go-nuts] Using Golang to upload and download files in pcloud using cmd

2020-10-26 Thread Dimas Prawira
I think the example given in the repo is run on command line, all you have to do is customize it using cobra https://github.com/spf13/cobra On Mon, Oct 26, 2020, 23:27 Bharath Baiju wrote: > Hello all, > > I am trying to use golang-pcloud project > to

Re: [go-nuts] Does concurrency have some effect over HTTP client?

2020-10-26 Thread JuanPablo AJ
Jesper, thanks a lot for your email, your answer was a hand in the dark forest of doubts. I will start trying the load generator wrk2. About "instrument, profile, observe", yes, I added the gops agent but until now I don't have any conclusion related to that information. Regards. On

Re: [go-nuts] Better generator support

2020-10-26 Thread 'Axel Wagner' via golang-nuts
On Mon, Oct 26, 2020, 19:05 Oliver Smith wrote: > > Hi Axel, thanks for replying; > > It isn't a pattern I teach anyone, rather it's a pattern which people I'm > encouraging to learn golang ask me about. Frequently. I was also under the > impression that generally passing a send-only channel to

Re: [go-nuts] Better generator support

2020-10-26 Thread Oliver Smith
Hi Axel, thanks for replying; It isn't a pattern I teach anyone, rather it's a pattern which people I'm encouraging to learn golang ask me about. Frequently. I was also under the impression that generally passing a send-only channel to a function could typically be considered an indicator the

[go-nuts] Better formatting of struct literals

2020-10-26 Thread Eric Lindsey
Recently, I gofmt'ed a block of code in a file and this is what I ended up with: embed := { Color: MembershipEmbedColor, Description: "This collection is empty.\n" + "Send an image or image URL to get started.", Footer: {Text: "Membership"}, } I would suggest that it would

Re: [go-nuts] Any embedded scripting language for Go

2020-10-26 Thread Alejandro Sáez Morollón
On 21/10/2020 07:31, Aravindhan K wrote: Hi, I am looking for a way to build interactive app,where user will be giving instructions to draw as a script,rendering of the script will be displayed live. I would like to use below 2d drawing package for same, github.com/fogleman/gg Is there

[go-nuts] Using Golang to upload and download files in pcloud using cmd

2020-10-26 Thread Bharath Baiju
Hello all, I am trying to use golang-pcloud project to upload and download files.With this i can upload my files but downloading is not working. Also when using this i can upload small size of files but when it is more than 50mb it is taking more time. Is

Re: [go-nuts] Distributed go testing (running "go test" as a client)

2020-10-26 Thread Craig Silverstein
> You realize that the flag "-count 1" disable the cache, right? Well, it disables *a* cache. The docs don't make it clear, but it seems like it only disables the test-cache. I don't see why it would affect the build caches -- build time being my theory as to why the tests are slower. But

[go-nuts] Re: Windows "syscalls" and Go pointers

2020-10-26 Thread Constantine Shablya
Amending question above: is it ok for a function that takes pointer to a pointer (so f(x *unsafe.Pointer) or f(**T)) to write a pointer (*x = unsafe.Pointer(...) or *x = (*T)(...)) or should it store an uintptr (as in f(x *uintptr)) and that uintptr then be cast to a pointer to appropriate

Re: [go-nuts] Distributed go testing (running "go test" as a client)

2020-10-26 Thread Shulhan
> On 26 Oct 2020, at 10.32, Craig Silverstein wrote: > > > But in my experimenting the overhead of calling `go test` is quite high: > > `go test -count 1 ; go test -count 1 ` is 50% slower than `go > > test -count1 `. > > Oops, I forgot to take parallelism into account. Once I do, it

Re: [go-nuts] Should I always call runtime.LockOSThread() before calling C function?

2020-10-26 Thread Jesper Louis Andersen
On Sun, Oct 25, 2020 at 7:20 PM Tamás Gulácsi wrote: > I'd put all that C-calling code in ONE goroution, with > runtime.LockOSThread, and send commands to this thread through a channel, > with a receiver chan for response, too. > This way only one goroutine needs LockOSThread, and only that pays

Re: [go-nuts] Re: SFTPGo gained Azure Blob Storage backend support

2020-10-26 Thread Nicola Murino
Il 26/10/20 01:38, ChrisLu ha scritto: > Hi, Nicola, Hi Chris, > > Great to see the SFTPGo author is also here!  > > Actually I was checking how to integrate FTP with SeaweedFS. It will > be great to get some insight from you: > > 1) Really dumb question. Do people still use FTP? I have not used