Skip to content

Commit

Permalink
Merge pull request #23 from hcraM41/main
Browse files Browse the repository at this point in the history
replace "io/ioutil"
  • Loading branch information
dobyte authored Aug 1, 2024
2 parents ea38e4e + 245278b commit 1202353
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions crypto/ecc/key.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@ import (
"crypto/rand"
"crypto/x509"
"encoding/pem"
"io"
"os"
"path"

"github.com/dobyte/due/v2/errors"
"github.com/dobyte/due/v2/utils/xconv"
"github.com/dobyte/due/v2/utils/xpath"
"github.com/ethereum/go-ethereum/crypto/ecies"
"io"
"io/ioutil"
"os"
"path"
)

type Key struct {
Expand Down Expand Up @@ -162,7 +162,7 @@ func loadKey(key string) (*pem.Block, error) {
)

if xpath.IsFile(key) {
buffer, err = ioutil.ReadFile(key)
buffer, err = os.ReadFile(key)
if err != nil {
return nil, err
}
Expand Down
10 changes: 5 additions & 5 deletions crypto/rsa/key.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ import (
"crypto/rsa"
"crypto/x509"
"encoding/pem"
"github.com/dobyte/due/v2/errors"
"github.com/dobyte/due/v2/utils/xconv"
"github.com/dobyte/due/v2/utils/xpath"
"io"
"io/ioutil"
"os"
"path"

"github.com/dobyte/due/v2/errors"
"github.com/dobyte/due/v2/utils/xconv"
"github.com/dobyte/due/v2/utils/xpath"
)

type Format int
Expand Down Expand Up @@ -174,7 +174,7 @@ func loadKey(key string) (*pem.Block, error) {
)

if xpath.IsFile(key) {
buffer, err = ioutil.ReadFile(key)
buffer, err = os.ReadFile(key)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 1202353

Please sign in to comment.