diff options
| author | chrislu <chris.lu@gmail.com> | 2024-09-29 10:35:53 -0700 |
|---|---|---|
| committer | chrislu <chris.lu@gmail.com> | 2024-09-29 10:35:53 -0700 |
| commit | 9cd263b2cec3ba40623d4738c453818b0f3b079b (patch) | |
| tree | 5c86e06dc8cb8088d887f105e01b1309f6cb3605 | |
| parent | 701abbb9df1b21b2acef8af6b5f1093754dd4f40 (diff) | |
| download | seaweedfs-9cd263b2cec3ba40623d4738c453818b0f3b079b.tar.xz seaweedfs-9cd263b2cec3ba40623d4738c453818b0f3b079b.zip | |
refactor
| -rw-r--r-- | weed/shell/command.go | 14 | ||||
| -rw-r--r-- | weed/shell/commands.go | 12 |
2 files changed, 14 insertions, 12 deletions
diff --git a/weed/shell/command.go b/weed/shell/command.go new file mode 100644 index 000000000..e1a820ff8 --- /dev/null +++ b/weed/shell/command.go @@ -0,0 +1,14 @@ +package shell + +import "io" + +type command interface { + Name() string + Help() string + Do([]string, *CommandEnv, io.Writer) error + IsResourceHeavy() bool +} + +var ( + Commands = []command{} +) diff --git a/weed/shell/commands.go b/weed/shell/commands.go index a29436a3c..582ee560d 100644 --- a/weed/shell/commands.go +++ b/weed/shell/commands.go @@ -6,7 +6,6 @@ import ( "github.com/seaweedfs/seaweedfs/weed/operation" "github.com/seaweedfs/seaweedfs/weed/pb/volume_server_pb" "github.com/seaweedfs/seaweedfs/weed/storage/needle_map" - "io" "net/url" "strconv" "strings" @@ -38,17 +37,6 @@ type CommandEnv struct { locker *exclusive_locks.ExclusiveLocker } -type command interface { - Name() string - Help() string - Do([]string, *CommandEnv, io.Writer) error - IsResourceHeavy() bool -} - -var ( - Commands = []command{} -) - func NewCommandEnv(options *ShellOptions) *CommandEnv { ce := &CommandEnv{ env: make(map[string]string), |
