diff options
| author | chrislu <chris.lu@gmail.com> | 2025-08-30 11:18:03 -0700 |
|---|---|---|
| committer | chrislu <chris.lu@gmail.com> | 2025-08-30 11:18:03 -0700 |
| commit | 87021a146027f83f911619f71b9c27bd51e9d55a (patch) | |
| tree | c7720f1c285683ce19d28931bd7c11b5475a2844 /weed/shell/shell_liner.go | |
| parent | 0748214c8e2f497a84b9392d2d7d4ec976bc84eb (diff) | |
| parent | 879d512b552d834136cfb746a239e6168e5c4ffb (diff) | |
| download | seaweedfs-origin/add-ec-vacuum.tar.xz seaweedfs-origin/add-ec-vacuum.zip | |
Merge branch 'master' into add-ec-vacuumorigin/add-ec-vacuum
Diffstat (limited to 'weed/shell/shell_liner.go')
| -rw-r--r-- | weed/shell/shell_liner.go | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/weed/shell/shell_liner.go b/weed/shell/shell_liner.go index 00884700b..0eb2ad4a3 100644 --- a/weed/shell/shell_liner.go +++ b/weed/shell/shell_liner.go @@ -3,19 +3,20 @@ package shell import ( "context" "fmt" - "github.com/seaweedfs/seaweedfs/weed/cluster" - "github.com/seaweedfs/seaweedfs/weed/pb" - "github.com/seaweedfs/seaweedfs/weed/pb/master_pb" - "github.com/seaweedfs/seaweedfs/weed/util" - "github.com/seaweedfs/seaweedfs/weed/util/grace" "io" - "math/rand" + "math/rand/v2" "os" "path" "regexp" "slices" "strings" + "github.com/seaweedfs/seaweedfs/weed/cluster" + "github.com/seaweedfs/seaweedfs/weed/pb" + "github.com/seaweedfs/seaweedfs/weed/pb/master_pb" + "github.com/seaweedfs/seaweedfs/weed/util" + "github.com/seaweedfs/seaweedfs/weed/util/grace" + "github.com/peterh/liner" ) @@ -69,7 +70,7 @@ func RunShell(options ShellOptions) { fmt.Printf("master: %s ", *options.Masters) if len(filers) > 0 { fmt.Printf("filers: %v", filers) - commandEnv.option.FilerAddress = filers[rand.Intn(len(filers))] + commandEnv.option.FilerAddress = filers[rand.IntN(len(filers))] } fmt.Println() } |
