v1.0.0: lint: fix deprecated library
Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
This commit is contained in:
parent
51e4cb9027
commit
7588000af4
1 changed files with 13 additions and 3 deletions
|
|
@ -3,6 +3,7 @@ package lib
|
|||
import (
|
||||
"crypto/ed25519"
|
||||
"crypto/rand"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"time"
|
||||
|
|
@ -53,12 +54,21 @@ func InitGlobalBiscuit() error {
|
|||
break
|
||||
}
|
||||
}
|
||||
var err error
|
||||
PrivateKey, err = ioutil.ReadFile(filePrivateKey)
|
||||
file, err := os.Open(filePrivateKey)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
PublicKey, err = ioutil.ReadFile(filePublicKey)
|
||||
defer file.Close()
|
||||
PrivateKey, err = io.ReadAll(file)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
file, err = os.Open(filePublicKey)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
defer file.Close()
|
||||
PublicKey, err = io.ReadAll(file)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue