[go-nuts] Re: Iterator handling error

2024-08-31 Thread gbarr
I would likely go with something similar to how you would currently use bufio.Scanner but comine the use of .Scan() and .Text() as Range() ```go iter := rows.Iter(ctx) for obj := iter.Range { // do something with obj } if err := iter.Err(); err != nil { return err } ``` Or if rows can

Re: [go-nuts] Visual Studio for Mac Retirement, replacement ?

2023-09-02 Thread gbarr
no need to find a replacement for VS Code :) Tschüss, Björn -- *From:* golan...@googlegroups.com on behalf of gbarr *Sent:* Saturday, September 2, 2023 5:37:01 PM *To:* golang-nuts *Subject:* [go-nuts] Visual Studio for Mac Retirement, replacement ? Recently

[go-nuts] Visual Studio for Mac Retirement, replacement ?

2023-09-02 Thread gbarr
Recently MicroSoft announced the retirement of VS Code on Mac (see https://devblogs.microsoft.com/visualstudio/visual-studio-for-mac-retirement-announcement/ ) VS Code was popular with developers at my last employer and now retired I have used it for personal projects. I am a career long use

[go-nuts] Re: tls panic inside /usr/local/go/src/crypto/tls/conn.go

2023-02-11 Thread gbarr
On Saturday, February 11, 2023 at 10:32:37 AM UTC gbarr wrote: My guess is that your transportDialFunc function is returning (nil, nil) which the http transport code is not expecting. If you cannot create a connection then you should return a non-nil error. However the Transport.dial function

[go-nuts] Re: tls panic inside /usr/local/go/src/crypto/tls/conn.go

2023-02-11 Thread gbarr
My guess is that your transportDialFunc function is returning (nil, nil) which the http transport code is not expecting. If you cannot create a connection then you should return a non-nil error. However the Transport.dial function in net/http/transport.go does catch this case when using Transp

[go-nuts] Re: Trying to import etherum in go

2023-01-23 Thread gbarr
There is no package called github.com/ethereum/go-ethereum/ethash perhaps you meant github.com/ethereum/go-ethereum/consensus/ethash On Saturday, January 21, 2023 at 2:17:01 PM UTC ramki...@hotmail.com wrote: > Example/Test Code: > > https://pastebin.com/PaeuHuJx > > But I get the error > > go r

[go-nuts] Re: More details regarding changes to time.Time JSON marshalling/unmarshalling in 1.20?

2023-01-04 Thread gbarr
By reading the commit at https://github.com/golang/go/commit/72c58fb77192f7d17d87663c943360a48aae11dc the change that stands out most to me is bounds checking on the hour and minute elements of the time zone offset On Wednesday, January 4, 2023 at 7:54:50 AM UTC Ben Brcan wrote: > Hi, I notice

[go-nuts] Re: HTTPS proxy issue using CONNECT method

2022-12-05 Thread gbarr
ate the TCP tunnel while for HTTP it would forward the > request received. Is it true? > > Mauro > On Monday, December 5, 2022 at 8:23:18 AM UTC gbarr wrote: > >> On Saturday, December 3, 2022 at 4:46:54 PM UTC maumon...@gmail.com >> wrote: >> >>> Hello all

[go-nuts] Re: HTTPS proxy issue using CONNECT method

2022-12-05 Thread gbarr
On Saturday, December 3, 2022 at 4:46:54 PM UTC maumon...@gmail.com wrote: > Hello all, > > I have been facing an issue when I try to create a HTTP client which needs > to connect through a HTTPS proxy using the HTTP CONNEC method. I know that > it can be achieved setting my own http.Transport o

[go-nuts] Re: Any package implementing FIFO mutex?

2022-09-10 Thread gbarr
You could use golang.org/x/sync/semaphore NewWeighted(1) Aquire will return in order Graham On Friday, September 9, 2022 at 8:12:46 PM UTC+1 ChrisLu wrote: > "sync.Mutex" is not FIFO. Has any package implemented a dropping for FIFO > mutex? > > One similar solution is to use buffered channel,

[go-nuts] Re: Flushing keyboard buffer (cross platform) ?

2019-05-03 Thread gbarr
For BSD systems I think you need to use TIOCFLUSH instead of TCFLSH On Friday, May 3, 2019 at 1:28:36 PM UTC+1, Steve Mynott wrote: > > I've a terminal app where I read y/n confirm using fmt.Scanln and I'm > trying to flush the keyboard buffer before this. > > On linux (and probably other UNIX s