Re: [go-nuts] No time.Duration#UnmarshalText; is there a good reason?

2022-01-19 Thread Tamás Gulácsi
time.Duration.String() already does the pretty printing: https://pkg.go.dev/time@master#Duration.String time.ParseDuration is the parser which could be used in UnmarshalText. rog a következőt írta (2022. január 19., szerda, 12:55:49 UTC+1): > On Wed, 19 Jan 2022 at 04:19, Ian Lance Taylor

Re: [go-nuts] Type Parameters Proposal: constraint.Number should be replaced with constraints.Integer in the examples

2022-01-19 Thread Ian Lance Taylor
On Wed, Jan 19, 2022 at 1:50 AM Manlio Perillo wrote: > > I'm reading the Type Parameter Proposal to learn how to use type parameters > and I noted that one of the example in the "Element constraint example" > section uses the > constraints.Number constraint. This constraint does not exist and

[go-nuts] TLS validation: implement OCSP and CRL verifiers in Go

2022-01-19 Thread Cossack Labs
HI! Let us introduce you a new article written by Cossack Labs data security engineers for dev community. This time we explore OCSP and CRL as certificate validation approaches, TLS extensions that define them, and a simple Golang implementation. The article will be of help to Golang

Re: [go-nuts] No time.Duration#UnmarshalText; is there a good reason?

2022-01-19 Thread roger peppe
On Wed, 19 Jan 2022 at 04:19, Ian Lance Taylor wrote: > On Mon, Jan 17, 2022 at 9:53 PM Corin Lawson > wrote: > > > > It seems obvious (to me) that the encoding.TextUnmarshaler interface > could be implemented for time.Duration (it is implemented for time.Time, > afterall). > > > > The fact

Re: [go-nuts] Type Parameters Proposal: constraint.Number should be replaced with constraints.Integer in the examples

2022-01-19 Thread Manlio Perillo
I read it, but it only shows simple examples. The proposal shows a complex example like mutually referencing type parameters, several examples about non trivial cases and several examples for type inference. On Wednesday, January 19, 2022 at 11:00:52 AM UTC+1 axel.wa...@googlemail.com wrote:

Re: [go-nuts] Type Parameters Proposal: constraint.Number should be replaced with constraints.Integer in the examples

2022-01-19 Thread 'Axel Wagner' via golang-nuts
On Wed, Jan 19, 2022 at 10:50 AM Manlio Perillo wrote: > Hi. > > I'm reading the Type Parameter Proposal to learn how to use type > parameters and I noted that one of the example in the "Element constraint > example" section uses the > constraints.Number constraint. This constraint does not

[go-nuts] Type Parameters Proposal: constraint.Number should be replaced with constraints.Integer in the examples

2022-01-19 Thread Manlio Perillo
Hi. I'm reading the Type Parameter Proposal to learn how to use type parameters and I noted that one of the example in the "Element constraint example" section uses the constraints.Number constraint. This constraint does not exist and probably should be replaced with constraints.Integer. I