fix examples

This commit is contained in:
Patricio Whittingslow
2026-07-27 12:24:57 -03:00
parent 0d1f50fc48
commit a97959739e
4 changed files with 214 additions and 30 deletions
+1 -1
View File
@@ -50,7 +50,7 @@ func run() error {
}()
fmt.Println(time.Now().Format("15:04:05.000"), "writing...")
conn.Write(req)
hdr.Reset(nil)
hdr.Reset(nil, 0) // No preallocation. Both key/value and raw buffer will grow and allocate.
var needMore bool = true
for needMore {
_, err = hdr.ReadFromLimited(conn, 1024)