mirror of
https://github.com/Fishwaldo/restic-nats.git
synced 2025-03-15 11:31:42 +00:00
io.ReadAll -> ioutil.ReadAll (for earlier Go versions)
This commit is contained in:
parent
eec84db021
commit
7dbe182615
1 changed files with 2 additions and 1 deletions
|
@ -3,6 +3,7 @@ package rns
|
|||
import (
|
||||
"context"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
)
|
||||
|
||||
func (rns *ResticNatsClient) OpenRepo(ctx context.Context, hostname string) (OpenRepoResult, error) {
|
||||
|
@ -73,7 +74,7 @@ func (rns *ResticNatsClient) Load(ctx context.Context, dir string, filename stri
|
|||
func (rns *ResticNatsClient) Save(ctx context.Context, dir string, filename string, rd io.Reader) (SaveResult, error) {
|
||||
var err error
|
||||
op := SaveOp{Dir: dir, Name: filename}
|
||||
op.Data, err = io.ReadAll(rd)
|
||||
op.Data, err = ioutil.ReadAll(rd)
|
||||
if err != nil {
|
||||
rns.logger.Error("ReadAll Failed: %s", err)
|
||||
return SaveResult{}, err
|
||||
|
|
Loading…
Add table
Reference in a new issue