1
0
mirror of https://github.com/go-micro/go-micro.git synced 2025-06-24 22:26:54 +02:00

replace ioutil with io and os (#2327)

set the go version to 1.16 in pr.yml and tests.yml, so as to be consistent with the version in go.mod.
This commit is contained in:
Benjamin
2021-10-31 02:24:40 +08:00
committed by GitHub
parent ed690ed838
commit 5d5aee1f08
36 changed files with 84 additions and 95 deletions

View File

@ -5,7 +5,7 @@ import (
"encoding/pem"
"errors"
"fmt"
"io/ioutil"
"os"
)
// COPIED FROM
@ -31,7 +31,7 @@ func certificatesFromFile(file string) ([]*x509.Certificate, error) {
if len(file) == 0 {
return nil, errors.New("error reading certificates from an empty filename")
}
pemBlock, err := ioutil.ReadFile(file)
pemBlock, err := os.ReadFile(file)
if err != nil {
return nil, err
}