Re: [go-nuts] assert library with generics?

2024-02-28 Thread Harri L
I’m biased as well. FWIW, this is a subpackage of the error handling solution, err2 . The assertion pkg is proven to be a precious tool for many projects. It is unique because it can be used both for th

Re: [go-nuts] Could we trade all the `ctx context.Context` arguments for one pointer in `g`?

2024-02-28 Thread Sam Vilain
Hey, thanks for raising this important use case.  Do you have any specific examples in mind you could point to? I think the answer should follow easily from what defines a new scope.  New scopes get their own mini-stack frame created, and in that frame the context pointer can be saved like any

[go-nuts] How to have panic messages show in a PowerShell console

2024-02-28 Thread Thom BENTLEY
Hi All, OS: Windows 10 GoLang: go1.6.3 windows/386 I am trying to have a go executable run and show the panics it causes in the PowerShell console. I think I can use GODEBUG, but all the examples I've seen so far are for Linux. I've set that variable to paniclog=1, but nothing changed. If

Re: [go-nuts] How to have panic messages show in a PowerShell console

2024-02-28 Thread 'Jim Idle' via golang-nuts
You should upgrade your Go installation to the latest version and retry. Go 1.6.3, if that is not a typo is very old. Jim On Feb 28 2024, at 11:35 am, Thom BENTLEY wrote: > Hi All, > > OS: Windows 10 > GoLang: go1.6.3 windows/386 > > I am trying to have a go executable run and show the panics it

[go-nuts] x/pkgsite docs wrongly assume $PATH includes $GOPATH/bin

2024-02-28 Thread Robert Sawicki
Hey! As I was looking through Go docs recently, I've noticed docs for x/pkgsite wrongly assume that user's $PATH includes $GOPATH/bin, by using `pkgsite` as a way to launch the command right after installing it. Golang installation docs only mention adding */usr/lo

RE: [go-nuts] How to have panic messages show in a PowerShell console

2024-02-28 Thread 'BENTLEY Thom' via golang-nuts
Thanks Jim. At the moment, I’m using the 1.6.3 version as specified in the internal documentation the project I’m learning. I would definitely like to upgrade go to a much later version. Just don’t want to do it before I know it works on the specified version. From: Jim Idle Sent: Wednesday,

Re: [go-nuts] How to have panic messages show in a PowerShell console

2024-02-28 Thread Kurtis Rader
On Wed, Feb 28, 2024 at 4:39 PM 'BENTLEY Thom' via golang-nuts < golang-nuts@googlegroups.com> wrote: > Thanks Jim. > At the moment, I’m using the 1.6.3 version as specified in the internal > documentation the project I’m learning. > I would definitely like to upgrade go to a much later version.

Re: [go-nuts] x/pkgsite docs wrongly assume $PATH includes $GOPATH/bin

2024-02-28 Thread 'Axel Wagner' via golang-nuts
Doesn't the `go install` command explicitly instruct you to add $GOBIN/$GOPATH/bin to your $PATH? To me, that seems enough - it feels a bit arduous, to expect this piece of information at any single point on the web where `go install` is mentioned. On Thu, Feb 29, 2024 at 1:39 AM Robert Sawicki w

Re: [go-nuts] Equality of interface of an empty struct - why?

2024-02-28 Thread tapi...@gmail.com
On Wednesday, February 28, 2024 at 3:19:37 PM UTC+8 Axel Wagner wrote: That would break backwards compatibility, though. And it would be a re-definition (i.e. existing code would compile, but behave differently at runtime) and is hence not allowed even under the Go 2 transition rules. With G

Re: [go-nuts] Equality of interface of an empty struct - why?

2024-02-28 Thread 'Axel Wagner' via golang-nuts
The loop var change *does* break compatibility. And it did so knowingly and - as clearly explained - was an exception. Stop arguing in bad faith. On Thu, Feb 29, 2024 at 7:03 AM tapi...@gmail.com wrote: > > > On Wednesday, February 28, 2024 at 3:19:37 PM UTC+8 Axel Wagner wrote: > > That would b