aboutsummaryrefslogtreecommitdiff
path: root/pam_fscrypt
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@google.com>2022-12-04 13:27:43 -0800
committerEric Biggers <ebiggers3@gmail.com>2022-12-04 14:07:39 -0800
commit02875cef9010633b6689cfd1e2ceec9107b756b4 (patch)
tree9f310eac398e99dd12f42d94967b2e1bf1c7fe83 /pam_fscrypt
parent5373b314473b08f13372ab55b551738307a85fbd (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 'pam_fscrypt')
-rw-r--r--pam_fscrypt/run_fscrypt.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/pam_fscrypt/run_fscrypt.go b/pam_fscrypt/run_fscrypt.go
index db86d01..af9537f 100644
--- a/pam_fscrypt/run_fscrypt.go
+++ b/pam_fscrypt/run_fscrypt.go
@@ -31,7 +31,6 @@ import "C"
import (
"fmt"
"io"
- "io/ioutil"
"log"
"log/syslog"
"os"
@@ -132,7 +131,7 @@ func parseArgs(argc C.int, argv **C.char) map[string]bool {
// syslog.
func setupLogging(args map[string]bool) io.Writer {
log.SetFlags(0) // Syslog already includes time data itself
- log.SetOutput(ioutil.Discard)
+ log.SetOutput(io.Discard)
if args[debugFlag] {
debugWriter, err := syslog.New(syslog.LOG_DEBUG, moduleName)
if err == nil {
@@ -142,7 +141,7 @@ func setupLogging(args map[string]bool) io.Writer {
errorWriter, err := syslog.New(syslog.LOG_ERR, moduleName)
if err != nil {
- return ioutil.Discard
+ return io.Discard
}
return errorWriter
}