Re: [go-nuts] Ensure context timeout behaviour from caller, or callee ?

2023-09-20 Thread Jerry Londergaard
> > I find it awkward > and risky if I cannot pass down a cancelable context down the stack > where things may not return. Absolutely, we always want to be able to pass that down regardless. Those that are > lower the stack are not enforcing timeouts or cancellations, they are > merely getting a

Re: [go-nuts] Ensure context timeout behaviour from caller, or callee ?

2023-09-20 Thread burak serdar
On Wed, Sep 20, 2023 at 5:04 PM Jerry Londergaard wrote: > > Are you comfortable though, *relying* on this behaviour down the stack to > enforce the timeout that was declared > further up the stack (leaving potentially leaked goroutines out of it...)? That's the nature of handling requests

Re: [go-nuts] Ensure context timeout behaviour from caller, or callee ?

2023-09-20 Thread Jerry Londergaard
> > If the new goroutine can periodically > check context cancellation and needs to do some cleanup, then it is > best to pass the context down, clean up, and return on cancellation. Understood. I would always pass the context down anyway, letting that callee decide whether or not it wants to

[go-nuts] Re: Encrypting a small secret using curve25519

2023-09-20 Thread Tamás Gulácsi
https://pkg.go.dev/filippo.io/age offers a simple interface for encrypting/decrypting, with command line, too. christoph...@gmail.com a következőt írta (2023. szeptember 20., szerda, 10:02:24 UTC+2): > Hello, > > I noticed that the go standard library only support ed25519 signing ( >

Re: [go-nuts] Ensure context timeout behaviour from caller, or callee ?

2023-09-20 Thread burak serdar
On Wed, Sep 20, 2023 at 7:47 AM Jerry Londergaard wrote: > > When using a context.WithTimeout, I always felt that it should be the > function where the context was created should be the one that ensures that it > (the current function) does not block longer than intended. That is to say, > it

[go-nuts] Ensure context timeout behaviour from caller, or callee ?

2023-09-20 Thread Jerry Londergaard
When using a context.WithTimeout, I always felt that it should be the function where the context was created should be the one that ensures that it (the current function) does not block longer than intended. That is to say, it should call context.WithTimeout(), and then run the subsequent code

Re: [go-nuts] Re: Why doesn't the database/sql package in Go support using placeholders "?" to replace the database name and username in SQL statements?

2023-09-20 Thread Roland Müller
Even standard SQL does not support using bind variables for everything that uses SQL syntax and does not belong to DML (=data manipulation language) Am Montag, 18. September 2023 schrieb Vladimir Varankin : > A thing, that it may be valuable to explain further, is that Go's "database/sql" doesn't

Re: [go-nuts] Encrypting a small secret using curve25519

2023-09-20 Thread 'Axel Wagner' via golang-nuts
To be clear: I'm by no means an expert, so take my advice with a huge grain of salt (pun intended). But from what it seems, with no offense intended, neither are you. On Wed, Sep 20, 2023 at 10:32 AM Axel Wagner wrote: > As I understand it, ed25519 is using Curve25519 in EdDSA, which is a >

Re: [go-nuts] Encrypting a small secret using curve25519

2023-09-20 Thread 'Axel Wagner' via golang-nuts
As I understand it, ed25519 is using Curve25519 in EdDSA, which is a signing scheme. So using "ed25519" for encryption does not make any sense. NaCl also uses Curve25519, ultimately using ECDH (again, as I understand it) to establish a secret key for Salsa20. So it is pretty fundamentally

[go-nuts] Encrypting a small secret using curve25519

2023-09-20 Thread christoph...@gmail.com
Hello, I noticed that the go standard library only support ed25519 signing (https://pkg.go.dev/crypto/ed25519@go1.21.1). I would need to encrypt a small secret with the public key of the receiver so that he is the only one able to decrypt it with its private key. The small secret would

Re: [go-nuts] Re: 'go run hello.go' taking ~30 seconds on windows

2023-09-20 Thread Marcello H
You could leave it on, but exclude the directories that you use (also the temp one) https://www.thewindowsclub.com/exclude-a-folder-from-windows-security-scan Op wo 20 sep 2023 om 04:55 schreef Hoo Luu : > Windows defender slows apps first time ran. I had replaced several hard > disks(HDDs and