How Golang Generics Empower Concise APIs

An HTML Table Extraction Case Study

Serge Smertin
Better Programming
Published in
5 min readSep 18, 2022

--

Tired Gopher (of Quasilyte) is extracting table into memory

You’ve likely heard and read dozens of stories about generics in Go about ordinary slices and maps but haven’t yet thought about a fun way to apply this feature. Let’s implement the peer of pandas.read_html, which maps HTML tables into slices of structs! If it’s achievable even with Rust, why shouldn’t it be with Go?! This essay will…

--

--