~/talk

Command Line Scripting with Templates

Talkat Golang UK 2017 · 2017-08-16..08-18· [go, developer-experience]
name:Mark Ryan
links:none on file
slides:none on file

Go templates get extended into a lightweight command-line scripting DSL with a new package published as t4tools that injects functions like table/select/sort/filter and helpers describe/generateUsage so tools can document types and run richer queries. The package composes functions, adds tojson/promote/head/tail/rows/cols, and powers an ELF/Mach-O “dump” utility implemented in about 15 lines that successfully extracts headers, symbols and imports. It claims to reduce boilerplate and avoid fragile hardcoded type help.

AI-written summary · about

  1. 0:00Introduction
  2. 5:06Example
  3. 8:50Pipeline
  4. 11:05Fun Facts
  5. 12:34Template directives
  6. 13:24Functions
  7. 18:47Problems with templates
  8. 21:01Template for Tools
  9. 23:27Output to Template
  10. 28:49Elf Dump Tool
  11. 35:42Guidelines
  12. 40:26Comments
~/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.