Re: [go-nuts] Interactive input and "go test"

2021-11-05 Thread Amit Saha
On Fri, Nov 5, 2021 at 11:24 PM Amit Saha wrote: > > > > On Fri, 5 Nov 2021, 11:08 pm Axel Wagner, > wrote: >> >> First, to point out the obvious: It is a bad idea to have a test read from >> stdin. You should pass a separate io.Reader and use that. >> >> Next: exec.Cmd.{Stdin,Stdout,Stderr} ar

Re: [go-nuts] Golang JPEG2000 implementation / Gauging community interest in supporting it?

2021-11-05 Thread Adam Koszek
We're trying to do the same - when we encounter a JPEG2000 encoded file, we convert it. Yet we don't want to keep a converted copy because often people want to see the data in the original form. So right now we got a commercial DICOM codec with the capability of reading / compressing JPEG2000 DICO

Re: [go-nuts] Golang JPEG2000 implementation / Gauging community interest in supporting it?

2021-11-05 Thread Robert Engels
There are several open source Java encoder/decoder libraries. These can be translated pretty easily to Go. > On Nov 5, 2021, at 3:19 PM, 'Dan Kortschak' via golang-nuts > wrote: > > On Wed, 2021-11-03 at 18:50 -0700, Adam Koszek wrote: >> Hello, >> >> We (Segmed.ai) are processing a lot of

Re: [go-nuts] Golang JPEG2000 implementation / Gauging community interest in supporting it?

2021-11-05 Thread 'Dan Kortschak' via golang-nuts
On Wed, 2021-11-03 at 18:50 -0700, Adam Koszek wrote: > Hello, > > We (Segmed.ai) are processing a lot of medical imaging data. It comes > to us in the form of PNG/JPG/DICOM files. 90% of it is uncompressed > or using a normal JPEG encoding, but around ~7% of it is encoded with > lossless JPEG 2000

Re: [go-nuts] cmd/link: why golang linker only save parts of relocations into go.o in external linking mode?

2021-11-05 Thread Ian Lance Taylor
On Fri, Nov 5, 2021 at 9:36 AM 'LUO Hailing' via golang-nuts wrote: > > I'm new of golang linker, and I have a simple question about golang linker. > > PATH: go\src\cmd\link\internal\arm64\asm.go > function: > func elfreloc1(ctxt *ld.Link, out *ld.OutBuf, ldr *loader.Loader, s > loader.Sym, r loa

[go-nuts] Re: Mocking requests in Go

2021-11-05 Thread Roman Kuprov
Hah! I just had a question about this come up at a job interview! The Baader-Meinhoff is strong with this one! On Friday, November 5, 2021 at 11:17:23 AM UTC-6 Amnon wrote: > Nice post. Good advice. > > On Friday, 5 November 2021 at 17:08:25 UTC bke...@zushealth.com wrote: > >> Sharing an intere

[go-nuts] Re: Mocking requests in Go

2021-11-05 Thread Amnon
Nice post. Good advice. On Friday, 5 November 2021 at 17:08:25 UTC bke...@zushealth.com wrote: > Sharing an interesting post by Zus technologist > Sonya Huang on mocking requests in Go: > > https://www.linkedin.com/feed/update/urn:li:activity:6862376852103798784/ > --

[go-nuts] Mocking requests in Go

2021-11-05 Thread Brendan Keeler
Sharing an interesting post by Zus technologist Sonya Huang on mocking requests in Go: https://www.linkedin.com/feed/update/urn:li:activity:6862376852103798784/ -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubsc

Re: [go-nuts] Limit the number of goroutine while using errgroup

2021-11-05 Thread 'Sebastien Binet' via golang-nuts
One can use errgroup.Group in conjunction with x/sync/semaphore. -s Nov 5, 2021 17:36:56 Reach John : > How to control the number of goroutines when using errgroup? Is there a best > practice? > -- > You received this message because you are subscribed to the Google Groups > "golang-nuts" gro

[go-nuts] cmd/link: why golang linker only save parts of relocations into go.o in external linking mode?

2021-11-05 Thread 'LUO Hailing' via golang-nuts
Hi all, I'm new of golang linker, and I have a simple question about golang linker. PATH: go\src\cmd\link\internal\arm64\asm.go function: func elfreloc1(ctxt *ld.Link, out *ld.OutBuf, ldr *loader.Loader, s loader.Sym, r loader.ExtReloc, ri int, sectoff int64) bool { ... } In this function, it

[go-nuts] Limit the number of goroutine while using errgroup

2021-11-05 Thread Reach John
How to control the number of goroutines when using errgroup? Is there a best practice? -- 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...@go

Re: [go-nuts] Go build speed dependent on time after source modification

2021-11-05 Thread Mark Fletcher
On Fri, Nov 5, 2021 at 5:10 AM Alberto Donizetti wrote: > Could be due to https://github.com/golang/go/issues/48496 > Should be fixed on tip, but 1.17 is affected. > > Thanks for this pointer. I just tested this and it made a huge difference. For a change to a single file, compiling on 1.17.2 tak

Re: [go-nuts] Interactive input and "go test"

2021-11-05 Thread Amit Saha
On Fri, 5 Nov 2021, 11:08 pm Axel Wagner, wrote: > First, to point out the obvious: It is a bad idea to have a test read from > stdin. You should pass a separate io.Reader and use that. > > Next: exec.Cmd.{Stdin,Stdout,Stderr} are all set to os.DevNull by default, > meaning you don't get any inpu

Re: [go-nuts] Go build speed dependent on time after source modification

2021-11-05 Thread Alberto Donizetti
Could be due to https://github.com/golang/go/issues/48496 Should be fixed on tip, but 1.17 is affected. Alberto On Thursday, 4 November 2021 at 18:44:01 UTC+1 Mark Fletcher wrote: > On Thu, Nov 4, 2021 at 10:25 AM Brian Hatfield wrote: > >> This seems a little like you might have a background c

Re: [go-nuts] Interactive input and "go test"

2021-11-05 Thread 'Axel Wagner' via golang-nuts
First, to point out the obvious: It is a bad idea to have a test read from stdin. You should pass a separate io.Reader and use that. Next: exec.Cmd.{Stdin,Stdout,Stderr} are all set to os.DevNull by default, meaning you don't get any input or output. I assume - `go test` does not modify Cmd.Stdin

Re: [go-nuts] cgo error I don't understand

2021-11-05 Thread rob
That was it.  It's working now. Thank you very much. --rob solomon On 11/4/21 11:00 PM, Roland Müller wrote: Hello, the entry in the path for mingwin is wrong: it should be either start with C:\ or another drive letter or in case it's an absolute path with double backslash. Br Roland Am

Re: [go-nuts] Interactive input and "go test"

2021-11-05 Thread Amit Saha
> On 5 Nov 2021, at 10:27 pm, Amit Saha wrote: > > I have this test function: > > package main > > import ( > "bufio" > "fmt" > "os" > "testing" > ) > > func TestInput(t *testing.T) { > scanner := bufio.NewScanner(os.Stdin) > msg := "Your name

[go-nuts] Interactive input and "go test"

2021-11-05 Thread Amit Saha
I have this test function: package main import ( "bufio" "fmt" "os" "testing" ) func TestInput(t *testing.T) { scanner := bufio.NewScanner(os.Stdin) msg := "Your name please? Press the Enter key when done" fmt.Fprintln(os.Stdout, msg)

Re: [go-nuts] Golang JPEG2000 implementation / Gauging community interest in supporting it?

2021-11-05 Thread Nick
Hi Wojciech, Quoth Adam Koszek: > I know it's rather a rare format, yet it's "the standard". I wonder if there > are any other users interested in getting JPEG 2000 supported natively in Go? > Or maybe someone out there has its implementation written, and would need hand > open-sourcing it? > > I