fix: remove deprecated ioutil and rand calls
- Change ioutil to io and os calls per Go 1.16 deprecation - Move global random to localized random source
This commit is contained in:
@@ -4,7 +4,6 @@ import (
|
||||
"context"
|
||||
"fmt"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"log"
|
||||
"os"
|
||||
"sort"
|
||||
@@ -375,7 +374,7 @@ func (r *Replica) calcPos(ctx context.Context, generation string) (pos Pos, err
|
||||
}
|
||||
defer rd.Close()
|
||||
|
||||
n, err := io.Copy(ioutil.Discard, lz4.NewReader(rd))
|
||||
n, err := io.Copy(io.Discard, lz4.NewReader(rd))
|
||||
if err != nil {
|
||||
return pos, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user