change: convert brotli.Reader to io.ReadCloser

This commit is contained in:
debugtalk
2022-02-21 18:43:31 +08:00
parent 021b78f874
commit f69dbcbfb6
5 changed files with 13 additions and 35 deletions

View File

@@ -4,7 +4,7 @@ import (
"encoding/base64"
"encoding/json"
"fmt"
"io/ioutil"
"io"
"net/url"
"os"
"path/filepath"
@@ -98,7 +98,7 @@ func (h *har) load() (*Har, error) {
return nil, fmt.Errorf("open: %w", err)
}
data, err := ioutil.ReadAll(fp)
data, err := io.ReadAll(fp)
fp.Close()
if err != nil {
return nil, fmt.Errorf("read: %w", err)