1 comment

[ 3.2 ms ] story [ 11.7 ms ] thread
Library I wrote that mimics Python's advanced string formatting in Golang.

I found that the most interesting part of this was actually testing how closely it matches Python's formatter. To do that, it goes through a cgo wrapper and cffi, then uses the Python Hypothesis[1] library to generate random examples.

[1]: https://hypothesis.readthedocs.io/en/latest/