mcandre / toys

code demos for newbies
https://github.com/mcandre/toys
30 stars 6 forks source link

update to go (1.)20(.2) #365

Closed mcandre closed 1 year ago

mcandre commented 1 year ago

For FreeBSD RISC-V support, among other goodies.

The go command now defines architecture feature build tags, such as amd64.v2, to allow selecting a package implementation file based on the presence or absence of a particular architecture feature. See go help buildconstraint for details.

Improved detection of loop variable capture by nested functions The vet tool now reports references to loop variables following a call to T.Parallel() within subtest function bodies. Such references may observe the value of the variable from a different iteration (typically causing test cases to be skipped) or an invalid state due to unsynchronized concurrent access.

On Windows, the Go linker now supports modern LLVM-based C toolchains.

crypto/subtle The new function XORBytes XORs two byte slices together.

The ResponseWriter.WriteHeader function now supports sending 1xx status codes.

The HTTP server now accepts HEAD requests containing a body, rather than rejecting them as invalid.

Leading and trailing spaces are trimmed from cookie names, rather than being rejected as invalid. For example, a cookie setting of "name =value" is now accepted as setting the cookie "name".

A Cookie with an empty Expires field is now considered valid. Cookie.Valid only checks Expires when it is set.

path/filepath The new error SkipAll terminates a Walk immediately but successfully.

The new time layout constants DateTime, [DateOnly] (https://go.dev/pkg/time/#DateOnly), and TimeOnly provide names for three of the most common layout strings used in a survey of public Go source code.

The new Time.Compare method compares two times.

Parse now ignores sub-nanosecond precision in its input, instead of reporting those digits as an error.

The Time.MarshalJSON method is now more strict about adherence to RFC 3339.

https://go.dev/doc/go1.20

Using GOOS=illumos matches build tags and files as for GOOS=solaris in addition to illumos tags and files.

https://pkg.go.dev/cmd/go#hdr-Build_constraints

Tasks:

Projects: