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 wrote
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
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 develope
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 that
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:
>
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 exis
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 ho