Re: [go-nuts] How to detect a reflect.Value of nil ?

2023-06-01 Thread Rob Pike
I find this situation unsatisfactory. See https://github.com/golang/go/issues/51649 for my suggested fix. -rob On Fri, Jun 2, 2023 at 4:52 AM Ian Lance Taylor wrote: > On Thu, Jun 1, 2023 at 11:48 AM christoph...@gmail.com > wrote: > > > > I have a method that receives a reflect.Value as inpu

Re: [go-nuts] call for data on HTTP routing

2023-06-01 Thread Ian Lance Taylor
On Thu, Jun 1, 2023 at 2:23 PM 'Jonathan Amsterdam' via golang-nuts wrote: > > The second question is about a specific routing scheme, and here I have no > preconceived notions. Here is the context: given two routing patterns that > might otherwise conflict, we'd like to allow both by preferring

[go-nuts] call for data on HTTP routing

2023-06-01 Thread 'Jonathan Amsterdam' via golang-nuts
At https://github.com/golang/go/discussions/60227, we're discussing enhancements to the standard library's http.ServeMux routing. Two issues have arisen that we could use your help on. The first is easy to state: does fast routing matter? Are there Go web servers for which http.ServeMux is too

[go-nuts] [security] Go 1.20.5 and Go 1.19.10 pre-announcement

2023-06-01 Thread announce
Hello gophers, We plan to issue Go 1.20.5 and Go 1.19.10 during US business hours on Tuesday, June 6. These minor releases include PRIVATE security fixes to the standard library and the toolchain, covering the following CVEs: - CVE-2023-29402 - CVE-2023-29403 - CVE-2023-294

Re: [go-nuts] How to detect a reflect.Value of nil ?

2023-06-01 Thread Ian Lance Taylor
On Thu, Jun 1, 2023 at 11:48 AM christoph...@gmail.com wrote: > > I have a method that receives a reflect.Value as input argument. > > When the method is given the argument reflect.ValueOf(nil), the methods > Type(), IsNil(), or IsZero() panic. For instance, when I call the method > IsZero() I s

[go-nuts] How to detect a reflect.Value of nil ?

2023-06-01 Thread christoph...@gmail.com
I have a method that receives a reflect.Value as input argument. When the method is given the argument reflect.ValueOf(nil), the methods Type(), IsNil(), or IsZero() panic. For instance, when I call the method IsZero() I see the panic message "panic: reflect: call of reflect.Value.IsZero on ze