diff options
| author | Zachary Walters <zachary.christopher.walters@gmail.com> | 2023-02-21 21:47:33 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-02-21 19:47:33 -0800 |
| commit | ef2f741823bdb8cc9ebefb45183612a9cf630d5e (patch) | |
| tree | 72c4d6fbf38b85bff2edf669f880828de43cc98f /weed/shell/command_volume_fsck.go | |
| parent | 2c4dbaedf2d1703b32f81adefec796b0a78704d6 (diff) | |
| download | seaweedfs-ef2f741823bdb8cc9ebefb45183612a9cf630d5e.tar.xz seaweedfs-ef2f741823bdb8cc9ebefb45183612a9cf630d5e.zip | |
Updated the deprecated ioutil dependency (#4239)
Diffstat (limited to 'weed/shell/command_volume_fsck.go')
| -rw-r--r-- | weed/shell/command_volume_fsck.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/weed/shell/command_volume_fsck.go b/weed/shell/command_volume_fsck.go index 02956e9ca..5559be956 100644 --- a/weed/shell/command_volume_fsck.go +++ b/weed/shell/command_volume_fsck.go @@ -20,7 +20,6 @@ import ( "github.com/seaweedfs/seaweedfs/weed/storage/types" "github.com/seaweedfs/seaweedfs/weed/util" "io" - "io/ioutil" "math" "net/http" "net/url" @@ -409,7 +408,7 @@ func (c *commandVolumeFsck) collectOneVolumeFileIds(dataNodeId string, volumeId } buf.Write(resp.FileContent) } - if vinfo.isReadOnly == false { + if !vinfo.isReadOnly { index, err := idx.FirstInvalidIndex(buf.Bytes(), func(key types.NeedleId, offset types.Offset, size types.Size) (bool, error) { resp, err := volumeServerClient.ReadNeedleMeta(context.Background(), &volume_server_pb.ReadNeedleMetaRequest{ @@ -535,7 +534,7 @@ func (c *commandVolumeFsck) httpDelete(path util.FullPath) { } defer resp.Body.Close() - _, err = ioutil.ReadAll(resp.Body) + _, err = io.ReadAll(resp.Body) if err != nil { fmt.Fprintf(c.writer, "DELETE response error: %v\n", err) } |
