~/talk

A Beginners Guide to Context

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

Walks through the Go context API as folded into the standard library in Go 1.7, showing the actual functions: WithCancel, WithDeadline, WithTimeout and WithValue, plus Done, Err and Deadline semantics. Builds a small web search app that queries DuckDuckGo and Giphy concurrently with a hard 2‑second timeout, passes session-rated content via a context value (uses a private key type to avoid collisions), cancels other work when text results arrive, and demos Request.WithContext / context-aware HTTP clients.

AI-written summary · about

  1. 0:00Intro
  2. 0:41Agenda
  3. 0:54The problem
  4. 1:34The Context Package
  5. 2:19Context Overview
  6. 3:48Context Type
  7. 4:03Cancel
  8. 5:50Value
  9. 7:27Derived Context
  10. 8:13Background
  11. 9:07Cancellation
  12. 9:47Timeout
  13. 10:18DuckDuckGo
  14. 11:08Does it actually work
  15. 11:37Web Server
  16. 11:59Login
  17. 12:39Session Package
  18. 13:09Email Lookup
  19. 13:26Session Data
  20. 14:40Home Action
  21. 15:03Search Action
  22. 16:47Listen for Results
  23. 17:50Show Results
  24. 18:10Search
  25. 18:22Duck Duck Query
  26. 19:17After Deadline
  27. 19:33Get 4 Terms
  28. 21:07After Deadline Function
  29. 21:58Context HTTP
~/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.