aboutsummaryrefslogtreecommitdiff
path: root/cmd/create-account/main.go
diff options
context:
space:
mode:
authorNeil Alexander <neilalexander@users.noreply.github.com>2022-08-05 10:26:59 +0100
committerGitHub <noreply@github.com>2022-08-05 10:26:59 +0100
commitc8935fb53f122b367eda61ec7811c406193d29ba (patch)
tree928c78461943f180dde6b2b4e4cd1d26792248f1 /cmd/create-account/main.go
parent1b7f84250a46b401eccb89acafdef1b379f2dbc0 (diff)
Do not use `ioutil` as it is deprecated (#2625)
Diffstat (limited to 'cmd/create-account/main.go')
-rw-r--r--cmd/create-account/main.go5
1 files changed, 2 insertions, 3 deletions
diff --git a/cmd/create-account/main.go b/cmd/create-account/main.go
index 7f6d5105..92179a04 100644
--- a/cmd/create-account/main.go
+++ b/cmd/create-account/main.go
@@ -19,7 +19,6 @@ import (
"flag"
"fmt"
"io"
- "io/ioutil"
"os"
"regexp"
"strings"
@@ -157,7 +156,7 @@ func main() {
func getPassword(password, pwdFile string, pwdStdin bool, r io.Reader) (string, error) {
// read password from file
if pwdFile != "" {
- pw, err := ioutil.ReadFile(pwdFile)
+ pw, err := os.ReadFile(pwdFile)
if err != nil {
return "", fmt.Errorf("Unable to read password from file: %v", err)
}
@@ -166,7 +165,7 @@ func getPassword(password, pwdFile string, pwdStdin bool, r io.Reader) (string,
// read password from stdin
if pwdStdin {
- data, err := ioutil.ReadAll(r)
+ data, err := io.ReadAll(r)
if err != nil {
return "", fmt.Errorf("Unable to read password from stdin: %v", err)
}