From 433debc7acbaee3818d69479885173235915dfe8 Mon Sep 17 00:00:00 2001 From: Hyeonho Kim Date: Thu, 8 Aug 2024 01:34:19 +0900 Subject: [PATCH] chore: clean up unused code (#603) --- rueidisprob/bloomfilter.go | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/rueidisprob/bloomfilter.go b/rueidisprob/bloomfilter.go index 5c5853be..39cf7b39 100644 --- a/rueidisprob/bloomfilter.go +++ b/rueidisprob/bloomfilter.go @@ -1,12 +1,10 @@ package rueidisprob import ( - "bufio" "context" "errors" "math" "strconv" - "strings" "github.com/redis/rueidis" ) @@ -249,25 +247,6 @@ func numberOfBloomFilterHashFunctions(s uint, n uint) uint { return uint(math.Round(float64(s) / float64(n) * math.Log(2))) } -func parseRedisMajorVersion(info string) int { - scanner := bufio.NewScanner(strings.NewReader(info)) - for scanner.Scan() { - line := scanner.Text() - if strings.HasPrefix(line, "redis_version:") { - parts := strings.Split(strings.TrimSpace(line), ":") - if len(parts) == 2 { - ver := strings.Split(parts[1], ".") - if len(ver) == 3 { - vv, _ := strconv.ParseInt(ver[0], 10, 32) - return int(vv) - } - } - } - } - - return 0 -} - func (c *bloomFilter) Add(ctx context.Context, key string) error { return c.AddMulti(ctx, []string{key}) }