A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/cloudflare/cfssl/commit/6a932bb7bf8ce68afc752af67d61804c7cedf739 below:

replace uses of deprecated io/ioutil · cloudflare/cfssl@6a932bb · GitHub

File tree Expand file treeCollapse file tree 3 files changed

+7

-7

lines changed

Filter options

Expand file treeCollapse file tree 3 files changed

+7

-7

lines changed Original file line number Diff line number Diff line change

@@ -2,6 +2,7 @@

2 2

// Use of this source code is governed by a BSD-style

3 3

// license that can be found in the LICENSE file.

4 4 5 +

//go:build ignore

5 6

// +build ignore

6 7 7 8

// This program generates md5block.go

@@ -18,7 +19,6 @@ import (

18 19

"bytes"

19 20

"flag"

20 21

"go/format"

21 -

"io/ioutil"

22 22

"log"

23 23

"strings"

24 24

"text/template"

@@ -40,7 +40,7 @@ func main() {

40 40

if err != nil {

41 41

log.Fatal(err)

42 42

}

43 -

err = ioutil.WriteFile(*filename, data, 0644)

43 +

err = os.WriteFile(*filename, data, 0644)

44 44

if err != nil {

45 45

log.Fatal(err)

46 46

}

Original file line number Diff line number Diff line change

@@ -11,8 +11,8 @@ import (

11 11

"flag"

12 12

"fmt"

13 13

"io"

14 -

"io/ioutil"

15 14

"net"

15 +

"os"

16 16

"strconv"

17 17

"strings"

18 18

"sync"

@@ -156,7 +156,7 @@ func parseTestData(r io.Reader) (flows [][]byte, err error) {

156 156 157 157

// tempFile creates a temp file containing contents and returns its path.

158 158

func tempFile(contents string) string {

159 -

file, err := ioutil.TempFile("", "go-tls-test")

159 +

file, err := os.CreateTemp("", "go-tls-test")

160 160

if err != nil {

161 161

panic("failed to create temp file: " + err.Error())

162 162

}

Original file line number Diff line number Diff line change

@@ -18,8 +18,8 @@ import (

18 18

"encoding/pem"

19 19

"errors"

20 20

"fmt"

21 -

"io/ioutil"

22 21

"net"

22 +

"os"

23 23

"strings"

24 24

"time"

25 25

)

@@ -176,11 +176,11 @@ func Dial(network, addr string, config *Config) (*Conn, error) {

176 176

// Certificate.Leaf will be nil because the parsed form of the certificate is

177 177

// not retained.

178 178

func LoadX509KeyPair(certFile, keyFile string) (Certificate, error) {

179 -

certPEMBlock, err := ioutil.ReadFile(certFile)

179 +

certPEMBlock, err := os.ReadFile(certFile)

180 180

if err != nil {

181 181

return Certificate{}, err

182 182

}

183 -

keyPEMBlock, err := ioutil.ReadFile(keyFile)

183 +

keyPEMBlock, err := os.ReadFile(keyFile)

184 184

if err != nil {

185 185

return Certificate{}, err

186 186

}

You can’t perform that action at this time.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4