aboutsummaryrefslogtreecommitdiff
path: root/weed/shell/shell_liner.go
diff options
context:
space:
mode:
Diffstat (limited to 'weed/shell/shell_liner.go')
-rw-r--r--weed/shell/shell_liner.go15
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()
}