[go-nuts] More details regarding changes to time.Time JSON marshalling/unmarshalling in 1.20?

2023-01-03 Thread 'Ben Brcan' via golang-nuts
Hi, I noticed this in the draft release notes for 1.20: *The Time.MarshalJSON and Time.UnmarshalJSON methods are now more strict about adherence to RFC 3339.* Can we get some further detai

[go-nuts] Re: No timeout mechanism with the Request.Body.Read

2023-01-03 Thread Xie Yuchen
You could try SetDeadline with a short time span. The group mentioned it before, IIRC. On Tuesday, September 27, 2016 at 9:20:32 PM UTC+8 song...@gmail.com wrote: > http.Server.ReadTimeout is per the whole Read quest, but I need the > timeout for a single Request.Body.Read. > > > What need to d

[go-nuts] godoc formatting of example test

2023-01-03 Thread Scott Pakin
It seems godoc doesn't honor much formatting when rendering function comments for Example functions. In particular, it rewraps text that I consider preformatted. For example, // This is an example: // //foo // bar // baz // // Why does godoc wrap those lines in examples? func Exam

[go-nuts] Proposal: Tutorial Module Path

2023-01-03 Thread Christian Vintilla
Hello, I was going through the tutorial and may have found a small item that could make the tutorial a little smoother. In Tutorial: Get started with Go - The Go Programming Language , the example calls for creating a module path of *example/hello.*

Re: [go-nuts] Re: Unmarshal variable JSON structures

2023-01-03 Thread Fabrice Vaillant
Hello map[string]any might be frustrating if aField or bField are complex since you might want to convert them from any to dedicated struct. I would suggest map[string]json.RawMessage as a possible improvement. It allows delaying the parsing of part of the struct for this kind. However I don