rewrite Cookie with KVBuffer

This commit is contained in:
Patricio Whittingslow
2026-07-29 13:18:17 -03:00
parent feecdb309e
commit af0f1b8cc6
4 changed files with 46 additions and 72 deletions
+2 -5
View File
@@ -356,13 +356,10 @@ func TestCookie_ForEach(t *testing.T) {
c.ParseBytes([]byte("a=1; b=2; c=3"))
var keys []string
err := c.ForEach(func(key, value []byte) error {
c.ForEach(func(key, value []byte) bool {
keys = append(keys, string(key))
return nil
return true
})
if err != nil {
t.Fatal(err)
}
if len(keys) != 3 {
t.Fatalf("expected 3 cookie entries, got %d", len(keys))
}