From 02875cef9010633b6689cfd1e2ceec9107b756b4 Mon Sep 17 00:00:00 2001 From: Eric Biggers Date: Sun, 4 Dec 2022 13:27:43 -0800 Subject: Stop using deprecated package io/ioutil Since Go 1.16 (which recently became the minimum supported Go version for this project), the package io/ioutil is deprecated in favor of equivalent functionality in the io and os packages. staticcheck warns about this. Address all the warnings by switching to the non-deprecated replacement functions. --- cmd/fscrypt/fscrypt.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'cmd') diff --git a/cmd/fscrypt/fscrypt.go b/cmd/fscrypt/fscrypt.go index aa5b6f4..93f97de 100644 --- a/cmd/fscrypt/fscrypt.go +++ b/cmd/fscrypt/fscrypt.go @@ -26,7 +26,7 @@ package main import ( "fmt" - "io/ioutil" + "io" "log" "os" @@ -110,8 +110,8 @@ func setupCommand(command *cli.Command) { // io.Writers and that we haven't over-specified our flags. We only print the // logs when using verbose, and only print normal stuff when not using quiet. func setupBefore(c *cli.Context) error { - log.SetOutput(ioutil.Discard) - c.App.Writer = ioutil.Discard + log.SetOutput(io.Discard) + c.App.Writer = io.Discard if verboseFlag.Value { log.SetOutput(os.Stdout) -- cgit v1.2.3