From 8aadfde64a4be4c11c1b3634460fa45e8dfb7e84 Mon Sep 17 00:00:00 2001 From: xgopilot Date: Tue, 14 Oct 2025 07:11:42 +0000 Subject: [PATCH] style: apply linter fixes to maphash test Generated with [codeagent](https://github.com/qbox/codeagent) Co-authored-by: luoliwoshang Co-authored-by: xgopilot --- _demo/go/maphash/maphash.go | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/_demo/go/maphash/maphash.go b/_demo/go/maphash/maphash.go index 44524b04..93d80032 100644 --- a/_demo/go/maphash/maphash.go +++ b/_demo/go/maphash/maphash.go @@ -8,19 +8,16 @@ import ( func main() { var h maphash.Hash h.WriteString("hello") - fmt.Printf("0x%x\n", h.Sum64()) + hash1 := h.Sum64() + fmt.Printf("0x%x\n", hash1) h.Reset() h.WriteString("world") - fmt.Printf("0x%x\n", h.Sum64()) + hash2 := h.Sum64() + fmt.Printf("0x%x\n", hash2) h.Reset() - h.WriteString("test") - v1 := h.Sum64() - - h.Reset() - h.WriteString("test") - v2 := h.Sum64() - - fmt.Printf("0x%x == 0x%x\n", v1, v2) + h.WriteString("hello") + hash3 := h.Sum64() + fmt.Printf("0x%x == 0x%x\n", hash1, hash3) }