Re: [go-nuts] Best IDE for GO ?

2023-08-23 Thread TheDiveO
"That education place" considers thermodynamics to be a cultural issue, see their waterseer disaster where MIT even doubled down on not understanding physics and thermodynamics at all. On Sunday, August 20, 2023 at 1:57:22 PM UTC+2 Robert Engels wrote: > MIT = “that education place” is pretty

[go-nuts] Using underscore in return statements - a small convenience idea

2023-08-23 Thread Nick Craig-Wood
// Sometimes you end up typing this having to return // a value you made up but don't care about. func f1() (int, error) { return -1, errors.New("something went wrong") } // Or maybe like this with named return values. func f2() (a int, err error) { return a, errors.New("something went wrong") }

Re: [go-nuts] Best IDE for GO ?

2023-08-23 Thread Robert Engels
Ah. I forgot I was on that Internet thingy. > On Aug 23, 2023, at 2:29 AM, TheDiveO wrote: > > "That education place" considers thermodynamics to be a cultural issue, see > their waterseer disaster where MIT even doubled down on not understanding > physics and thermodynamics at all. > >>

[go-nuts] Re: Best IDE for GO ?

2023-08-23 Thread alex-coder
Hi All ! Considering that IBM's punch cards were bearing at least twice, I would vote for them. :-) Of cource I do agree with them who wrote that to feel comfortable "under fingers" is great ! So, the tasks to code - they are different. Sometimes it is possible to keep all the details

[go-nuts] How to be a good slog module?

2023-08-23 Thread TheDiveO
Up front, I admit my sin of arrogance in giving structured logging the slip these past years and misusing logrus just as a text logger with multiple log levels. This question is kind of my atoning... For preparation, I've read through (today's?) Go slog blog post, as well as some comparably

Re: [go-nuts] How to be a good slog module?

2023-08-23 Thread 'Sean Liao' via golang-nuts
If your modules are mostly structs with lifecycle methods, do it like http.Server where the logger is a field (or option passed into the constructor). Else if your modules take contexts, you could consider having your own WithLogger / FromContext funcs to pass a logger in a context. An advantage

Re: [go-nuts] How to be a good slog module?

2023-08-23 Thread Andrew Harris
I've found implementing LogValuer can be a useful approach as well. Depending on the package, it can be enough to suggest a package doesn't need to be doing any logging, and if refactoring code from unstructured to structured logging it's useful in any case. On Wednesday, August 23, 2023 at

[go-nuts] Re: Download large Zip file via sftp

2023-08-23 Thread Tamás Gulácsi
Possibly it's a concurrency error in the sftp library you're using. Compile with "-race" flag and test it - it should print out the offending code. Phillip Siessl a következőt írta (2023. augusztus 23., szerda, 14:37:10 UTC+2): > Hi > > i have some issues when i try to download a larger zip

Re: [go-nuts] Download large Zip file via sftp

2023-08-23 Thread burak serdar
On Wed, Aug 23, 2023 at 6:37 AM Phillip Siessl wrote: > Hi > > i have some issues when i try to download a larger zip file (5GB) via the > sftp package in go. > about 20% of the time it runs through smoothly but the other 80% i get a > panic with > "fatal error: concurrent map writes writing to

[go-nuts] Download large Zip file via sftp

2023-08-23 Thread Phillip Siessl
Hi i have some issues when i try to download a larger zip file (5GB) via the sftp package in go. about 20% of the time it runs through smoothly but the other 80% i get a panic with "fatal error: concurrent map writes writing to file" or "fatal error: concurrent map read and map write". this

Re: [go-nuts] Re: Using underscore in return statements - a small convenience idea

2023-08-23 Thread 'Sean Liao' via golang-nuts
see also: https://go.dev/issues/19642 https://go.dev//issues/21182 - sean On Wed, Aug 23, 2023 at 3:10 PM Nick Craig-Wood wrote: > Ah ha! I thought there would be a related issue I couldn't find :-) > > `zero` would remove most of the pain though IMHO `_` looks neater in the > return

[go-nuts] Re: Using underscore in return statements - a small convenience idea

2023-08-23 Thread Brian Candler
Something similar is in the pipeline: https://github.com/golang/go/issues/61372 When implemented, it will be spelled "zero" rather than "_" As I understand it, you'll still need to say 0, "" or nil where those are available for the type in question. Therefore in the f1() example you gave,

[go-nuts] Re: Using underscore in return statements - a small convenience idea

2023-08-23 Thread Nick Craig-Wood
Ah ha! I thought there would be a related issue I couldn't find :-) `zero` would remove most of the pain though IMHO `_` looks neater in the return statements! Thanks for the pointer Brian. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To

[go-nuts] Re: [ANN] go-zeromq/zmq4: pure-Go implementation of ZeroMQ

2023-08-23 Thread Amnon
Apologies for reopening an ancient thread. But what was the motivation for re-implementing zeroMQ in Go? I am asking because my company is proposing to add zeroMQ support to our code using a CGO wrapper for libzmq. (Currently our product is pure Go). What problems would should we expect if we

[go-nuts] Re: [ANN] go-zeromq/zmq4: pure-Go implementation of ZeroMQ

2023-08-23 Thread Vitaly
what about ZeroMQ vs nanomsq? среда, 23 августа 2023 г. в 21:24:04 UTC+5, Amnon: > Apologies for reopening an ancient thread. > But what was the motivation for re-implementing zeroMQ in Go? > > I am asking because my company is proposing to add zeroMQ support to our > code > using a CGO