mirror of
https://github.com/crunchy-labs/crunchy-cli.git
synced 2026-01-21 12:12:00 -06:00
Replaced ioutil package with io
This commit is contained in:
parent
52a8f81356
commit
16fcf08f34
3 changed files with 8 additions and 10 deletions
|
|
@ -4,7 +4,6 @@ import (
|
|||
"fmt"
|
||||
"github.com/ByteDream/crunchyroll-go"
|
||||
"github.com/spf13/cobra"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"os/user"
|
||||
"path/filepath"
|
||||
|
|
@ -46,7 +45,7 @@ func loginCredentials(user, password string) error {
|
|||
os.Exit(1)
|
||||
}
|
||||
|
||||
return ioutil.WriteFile(loginStorePath(), []byte(fmt.Sprintf("%s\n%s", user, password)), 0600)
|
||||
return os.WriteFile(loginStorePath(), []byte(fmt.Sprintf("%s\n%s", user, password)), 0600)
|
||||
}
|
||||
|
||||
func loginSessionID(sessionID string) error {
|
||||
|
|
@ -56,7 +55,7 @@ func loginSessionID(sessionID string) error {
|
|||
os.Exit(1)
|
||||
}
|
||||
|
||||
return ioutil.WriteFile(loginStorePath(), []byte(sessionID), 0600)
|
||||
return os.WriteFile(loginStorePath(), []byte(sessionID), 0600)
|
||||
}
|
||||
|
||||
func loginStorePath() string {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue