mirror of
https://github.com/hyperledger/fabric-samples.git
synced 2026-06-23 01:55:10 +00:00
replace ioutil usage
Signed-off-by: Fang Yuan <wojiushifangyuanlove@gmail.com>
This commit is contained in:
parent
b3be8ae96b
commit
9421fdd0eb
1 changed files with 2 additions and 3 deletions
|
|
@ -1,7 +1,6 @@
|
|||
package business
|
||||
|
||||
import (
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"os"
|
||||
"path/filepath"
|
||||
|
|
@ -42,11 +41,11 @@ func AddUser() error {
|
|||
privateKeyPath := filepath.Join(credPath, "keystore", "priv_sk")
|
||||
log.Println("privateKeyPath: " + privateKeyPath)
|
||||
// read the certificate pem
|
||||
certificate, err := ioutil.ReadFile(filepath.Clean(certPath))
|
||||
certificate, err := os.ReadFile(filepath.Clean(certPath))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
privateKey, err := ioutil.ReadFile(filepath.Clean(privateKeyPath))
|
||||
privateKey, err := os.ReadFile(filepath.Clean(privateKeyPath))
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue