diff options
| author | Ryan Russell <ryanrussell@users.noreply.github.com> | 2022-09-14 13:24:27 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-09-14 11:24:27 -0700 |
| commit | c4363c4b5e34391157ebaba37557eca073e1f3e2 (patch) | |
| tree | ba406755d04154b41c1a523f99b00a20ca5a9f9a | |
| parent | a36d7b77beeb98f1a22b1c4175079d166c0b0d8f (diff) | |
| download | seaweedfs-c4363c4b5e34391157ebaba37557eca073e1f3e2.tar.xz seaweedfs-c4363c4b5e34391157ebaba37557eca073e1f3e2.zip | |
refactor(command_fs_rm): `entiries` -> `entries` (#3670)
Signed-off-by: Ryan Russell <git@ryanrussell.org>
Signed-off-by: Ryan Russell <git@ryanrussell.org>
| -rw-r--r-- | weed/shell/command_fs_rm.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/weed/shell/command_fs_rm.go b/weed/shell/command_fs_rm.go index ec29cced9..b8445b7e9 100644 --- a/weed/shell/command_fs_rm.go +++ b/weed/shell/command_fs_rm.go @@ -37,10 +37,10 @@ func (c *commandFsRm) Help() string { func (c *commandFsRm) Do(args []string, commandEnv *CommandEnv, writer io.Writer) (err error) { isRecursive := false ignoreRecursiveError := false - var entiries []string + var entries []string for _, arg := range args { if !strings.HasPrefix(arg, "-") { - entiries = append(entiries, arg) + entries = append(entries, arg) continue } for _, t := range arg { @@ -52,12 +52,12 @@ func (c *commandFsRm) Do(args []string, commandEnv *CommandEnv, writer io.Writer } } } - if len(entiries) < 1 { + if len(entries) < 1 { return fmt.Errorf("need to have arguments") } commandEnv.WithFilerClient(false, func(client filer_pb.SeaweedFilerClient) error { - for _, entry := range entiries { + for _, entry := range entries { targetPath, err := commandEnv.parseUrl(entry) if err != nil { fmt.Fprintf(writer, "rm: %s: %v\n", targetPath, err) |
