~/talk

Advanced Patterns with io ReadWriter

Talkat Golang UK 2016 · on Thursday, 2016-08-18· [software-architecture]
links:none on file
slides:none on file

Shows how to stream and transform byte streams without buffering the whole payload, using io.TeeReader to siphon bytes to an MD5 digest while preserving raw chunks, httputil.NewChunkedReader to detect the zero-length terminator and trailers, and io.Pipe + bufio.Scanner to build a line-prefixing writer that multiplexes long-running subprocess output. Demonstrates trade-offs: one-reader single-copy is faster but more code, the composed approach makes correctness simple, and careless blocking can leak goroutines unless outputs are closed or timeouts applied.

AI-written summary · about

  1. 0:00Introduction
  2. 2:10io ReadWriter
  3. 6:30Chunked Reader
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.