~/talk

Writing a code generator to make your code more secure

Talkat GoDays 2020 · 2020-01-21..01-23· [security]
links:none on file
slides:none on file

A small CLI generator called beef escape is built to auto-create Go methods that hide credentials by implementing the stringer and go string printing interfaces, so sensitive values print as stars. It uses packages.Load to inspect the package, selects templates based on whether the underlying type is string, writes a _generated.go file and runs go generate and go import on it. The demo runs and prints masked values as expected.

AI-written summary · about

  1. 0:00Intro
  2. 1:09About Blacklane
  3. 1:45Motivation
  4. 2:05Agenda
  5. 2:28Whats a code generator
  6. 3:18Examples
  7. 4:00Why are they useful
  8. 4:28How to use them
  9. 6:13Ingo
  10. 8:25Code Generation
  11. 10:01Load more than one package
  12. 10:32Inspecting the package
  13. 11:25Text template package
  14. 11:59Two types of types
  15. 12:35Inspecting the type
  16. 13:15Generating the code
  17. 13:55Saving the code
  18. 14:26Importing the code
  19. 15:51Code generator
  20. 16:01Go Generate
  21. 17:29Demo Type
~/search
type to search 8,222 conferences, 162,397 speakers and 219,688 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
← →
on a talk: 5 seconds back / forward
0–9
on a talk: jump to 0%–90% of the recording
?
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.