You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A compiler error ./prog.go:37:18: undefined: io.ReadAll
Analysis
The example is modified to use io.ReadAll introduced in Go 1.16 to replace the one from deprecated package io/ioutil.
However, the compiler used to run the example is still Go 1.15.8, as shown by using runtime.Version(), not not supporting io.ReadAll().
The text was updated successfully, but these errors were encountered:
tnerolftnerolf
changed the title
Exemple https://golang.org/pkg/mime/multipart/#example_NewReader doesn't build
Example https://golang.org/pkg/mime/multipart/#example_NewReader doesn't build
Feb 24, 2021
What version of Go are you using (
go version
)?Expected version is 1.16, but it appears that the Go version running the example is 1.15.8.
Does this issue reproduce with the latest release?
With the latest available multipart package documentation available on internet as of 24/02/2021 9:35 am CET, yes.
What operating system and processor architecture are you using (
go env
)?Not applicable
What did you do?
I tried to run the example https://golang.org/pkg/mime/multipart/#example_NewReader.
What did you expect to see?
A running exemple.
What did you see instead?
A compiler error ./prog.go:37:18: undefined: io.ReadAll
Analysis
The example is modified to use io.ReadAll introduced in Go 1.16 to replace the one from deprecated package io/ioutil.
However, the compiler used to run the example is still Go 1.15.8, as shown by using runtime.Version(), not not supporting io.ReadAll().
The text was updated successfully, but these errors were encountered: