Skip to content

Commit

Permalink
Migrate from deprecated ioutil pkg
Browse files Browse the repository at this point in the history
  • Loading branch information
szh committed Nov 4, 2024
1 parent ea132d3 commit 29fe03a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tds.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"errors"
"fmt"
"io"
"io/ioutil"
"os"
"net"
"sort"
"strconv"
Expand Down Expand Up @@ -257,7 +257,7 @@ func readPreloginWithPacketType(
if err != nil {
return nil, err
}
struct_buf, err := ioutil.ReadAll(r)
struct_buf, err := io.ReadAll(r)
if err != nil {
return nil, err
}
Expand Down Expand Up @@ -1119,7 +1119,7 @@ initiate_connection:
if encrypt != EncryptNotSup {
var config tls.Config
if p.certificate != "" {
pem, err := ioutil.ReadFile(p.certificate)
pem, err := os.ReadFile(p.certificate)
if err != nil {
return nil, fmt.Errorf("Cannot read certificate %q: %v", p.certificate, err)
}
Expand Down

0 comments on commit 29fe03a

Please sign in to comment.