Skip to content

chore: ioutil.Discard, ioutil.ReadFil and ioutil.TempFile, is deprecated#34

Open
maxwelbm wants to merge 1 commit intoNetflix:masterfrom
maxwelbm:chore/funcs_deprecated
Open

chore: ioutil.Discard, ioutil.ReadFil and ioutil.TempFile, is deprecated#34
maxwelbm wants to merge 1 commit intoNetflix:masterfrom
maxwelbm:chore/funcs_deprecated

Conversation

@maxwelbm
Copy link
Copy Markdown

// Deprecated: As of Go 1.16, this value is simply [io.Discard].
var Discard io.Writer = io.Discard

// Deprecated: As of Go 1.17, this function simply calls [os.CreateTemp].
func TempFile(dir, pattern string) (f *os.File, err error) {

// Deprecated: As of Go 1.16, this function simply calls [os.ReadFile].
func ReadFile(filename string) ([]byte, error) {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant