Skip to content

Commit

Permalink
remove chinese note
Browse files Browse the repository at this point in the history
  • Loading branch information
QlQlqiqi committed Aug 7, 2024
1 parent 40ca116 commit c1ebe48
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions tests/integration/set_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -423,18 +423,15 @@ var _ = Describe("Set Commands", func() {
Expect(info.Val()).NotTo(Equal(""))
Expect(info.Val()).To(ContainSubstring(`cache_keys`))
cache_keys := extractValue(info.Val(), "cache_keys")
Expect(cache_keys).To(Equal("0"))
Expect(cache_keys).To(ContainSubstring("0"))
})
})
})

func extractValue(data, key string) string {
// 按行分割字符串
lines := strings.Split(data, "\n")
for _, line := range lines {
// 查找包含指定键的行
if strings.HasPrefix(line, key+":") {
// 提取键值对的值部分
parts := strings.Split(line, ":")
if len(parts) == 2 {
return parts[1]
Expand Down

0 comments on commit c1ebe48

Please sign in to comment.