Testing by Go Playground example

Published: Monday, Nov 23, 2020 Last modified: Monday, Jun 14, 2021

I really like the test by example feature in Go. Not many people know this actually works in the Go playground like so: https://play.golang.org/p/UIYvV19R-H6

Furthermore the Go Playground has a Tests dropdown https://play.golang.org/p/kIZkoT2EvJX for Table driven tests!

If you like this tip, you might want to use a proper editor like vim as follow my video tips.