All tags

How to mock OAuth 2.0 in Go

Jan 04, 2020
14 min read
Mirco Zeiss

We use OAuth 2.0 to access your information from GitHub. That way we don't have to store any sensitive data and you don't need an extra account. In production this works great. During development it makes our lives harder because GitHub needs access to our machines. We solve this problem by mocking all OAuth related networks requests to generate a fake token. This token won't give you access to the GitHub API so we also have to stub those requests.

Keeping an eye on your Docker image size

Sep 23, 2019
7 min read
Mirco Zeiss

Getting started with Docker is super easy. However it is also easy to shoot yourself in the foot. Default Docker images are quite large and since you need a lot of them it all adds up. Keep an eye on your Docker image size by using four simple techniques.

Monitoring benchmarks over time in Go

Sep 10, 2019
3 min read
Mirco Zeiss

Having benchmarks for your critical code paths ensures stable performance and protection against accidental changes. However benchmarks are usually only done once and never run continuously. Learn how to keep an eye on your benchmarks over time.

How to measure code coverage in Go

Sep 06, 2019
4 min read
Mirco Zeiss

Code coverage is a first class citizen in Go. However programmatically getting the total code coverage for multiple packages within a single project can be tricky. Learn how to retrieve the overall code coverage by using standard Unix command line tools like grep and awk connected via pipes.