aboutsummaryrefslogtreecommitdiff
path: root/weed/shell/command_fs_configure.go
diff options
context:
space:
mode:
authorChris Lu <chris.lu@gmail.com>2020-12-06 20:05:06 -0800
committerChris Lu <chris.lu@gmail.com>2020-12-06 20:05:06 -0800
commitae5eb85a0692c46fb6a66818b3cc08bb26ed8cdb (patch)
tree1ace09ffd0487664a40eac8472eb2379bdac3868 /weed/shell/command_fs_configure.go
parent5931a2f53f576207f23997bdd209888972ed51b5 (diff)
downloadseaweedfs-ae5eb85a0692c46fb6a66818b3cc08bb26ed8cdb.tar.xz
seaweedfs-ae5eb85a0692c46fb6a66818b3cc08bb26ed8cdb.zip
refactoring
Diffstat (limited to 'weed/shell/command_fs_configure.go')
-rw-r--r--weed/shell/command_fs_configure.go14
1 files changed, 1 insertions, 13 deletions
diff --git a/weed/shell/command_fs_configure.go b/weed/shell/command_fs_configure.go
index 1600fddec..f388c9603 100644
--- a/weed/shell/command_fs_configure.go
+++ b/weed/shell/command_fs_configure.go
@@ -5,7 +5,6 @@ import (
"flag"
"fmt"
"io"
- "math"
"net/http"
"strings"
@@ -65,18 +64,7 @@ func (c *commandFsConfigure) Do(args []string, commandEnv *CommandEnv, writer io
var buf bytes.Buffer
if err = commandEnv.WithFilerClient(func(client filer_pb.SeaweedFilerClient) error {
-
- request := &filer_pb.LookupDirectoryEntryRequest{
- Directory: filer.DirectoryEtc,
- Name: filer.FilerConfName,
- }
- respLookupEntry, err := filer_pb.LookupEntry(client, request)
- if err != nil {
- return err
- }
-
- return filer.StreamContent(commandEnv.MasterClient, &buf, respLookupEntry.Entry.Chunks, 0, math.MaxInt64)
-
+ return filer_pb.ReadEntry(commandEnv.MasterClient, client, filer.DirectoryEtc, filer.FilerConfName, &buf)
}); err != nil && err != filer_pb.ErrNotFound {
return err
}