diff options
| author | Eric Biggers <ebiggers@google.com> | 2022-12-04 13:27:43 -0800 |
|---|---|---|
| committer | Eric Biggers <ebiggers3@gmail.com> | 2022-12-04 14:07:39 -0800 |
| commit | 02875cef9010633b6689cfd1e2ceec9107b756b4 (patch) | |
| tree | 9f310eac398e99dd12f42d94967b2e1bf1c7fe83 /cmd/fscrypt | |
| parent | 5373b314473b08f13372ab55b551738307a85fbd (diff) | |
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.
Diffstat (limited to 'cmd/fscrypt')
| -rw-r--r-- | cmd/fscrypt/fscrypt.go | 6 |
1 files changed, 3 insertions, 3 deletions
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) |