A RetroSearch Logo

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

Search Query:

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

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

File tree Expand file treeCollapse file tree 3 files changed

+9

-9

lines changed

Filter options

Expand file treeCollapse file tree 3 files changed

+9

-9

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

@@ -7,21 +7,21 @@ import (

7 7

"encoding/json"

8 8

"flag"

9 9

"fmt"

10 -

"io/ioutil"

10 +

"io"

11 11

"os"

12 12 13 13

"github.com/cloudflare/cfssl/cli/version"

14 14

)

15 15 16 16

func readFile(filespec string) ([]byte, error) {

17 17

if filespec == "-" {

18 -

return ioutil.ReadAll(os.Stdin)

18 +

return io.ReadAll(os.Stdin)

19 19

}

20 -

return ioutil.ReadFile(filespec)

20 +

return os.ReadFile(filespec)

21 21

}

22 22 23 23

func writeFile(filespec, contents string, perms os.FileMode) {

24 -

err := ioutil.WriteFile(filespec, []byte(contents), perms)

24 +

err := os.WriteFile(filespec, []byte(contents), perms)

25 25

if err != nil {

26 26

fmt.Fprintf(os.Stderr, "%v\n", err)

27 27

os.Exit(1)

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

184 184

}

185 185 186 186

if contents, ok := input["ocspResponse"]; ok {

187 -

//ocspResponse is base64 encoded

187 +

// ocspResponse is base64 encoded

188 188

resp, err := base64.StdEncoding.DecodeString(contents.(string))

189 189

if err != nil {

190 190

fmt.Fprintf(os.Stderr, "Failed to parse ocspResponse: %v\n", err)

Original file line number Diff line number Diff line change

@@ -2,14 +2,14 @@

2 2

// All certificates in the input file paths are checked for revocation and bundled together.

3 3

//

4 4

// Usage:

5 +

//

5 6

// mkbundle -f bundle_file -nw number_of_workers certificate_file_path ...

6 7

package main

7 8 8 9

import (

9 10

"crypto/x509"

10 11

"encoding/pem"

11 12

"flag"

12 -

"io/ioutil"

13 13

"os"

14 14

"path/filepath"

15 15

"sync"

@@ -32,7 +32,7 @@ func worker(paths chan string, bundler chan *x509.Certificate, pool *sync.WaitGr

32 32 33 33

log.Infof("Loading %s", path)

34 34 35 -

fileData, err := ioutil.ReadFile(path)

35 +

fileData, err := os.ReadFile(path)

36 36

if err != nil {

37 37

log.Warningf("%v", err)

38 38

continue

Original file line number Diff line number Diff line change

@@ -3,7 +3,7 @@ package main

3 3

import (

4 4

"encoding/json"

5 5

"fmt"

6 -

"io/ioutil"

6 +

"io"

7 7

"net/http"

8 8

"net/http/httputil"

9 9

@@ -82,7 +82,7 @@ func dispatchRequest(w http.ResponseWriter, req *http.Request) {

82 82

}

83 83 84 84

defer req.Body.Close()

85 -

body, err := ioutil.ReadAll(req.Body)

85 +

body, err := io.ReadAll(req.Body)

86 86

if err != nil {

87 87

fail(w, req, http.StatusInternalServerError, 1, err.Error(), "while reading request body")

88 88

return

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