Hidden Options for Testing

January 7, 2020

I am uncertain this is a good idea, but I am experimenting with it. Before I get into the crux of this post, you should become familiar with a couple useful concepts in Go: Functional options. Using an external test package. Mocking time.Now in tests. The following is a quick recap on all three. Functional Options The first time I learnt about them was through Functional Options For Friendly APIs by Dave Cheney. ... Read more

© 2018 | Follow on Twitter | Hucore theme & Hugo