Managing your Go tool versions with go.mod
and a tools.go
(3 mins read).
Better dependency management for your tools and without needing to go install
the tools before executing them.
Managing your Go tool versions with go.mod
and a tools.go
(3 mins read).
Better dependency management for your tools and without needing to go install
the tools before executing them.
Week Notes 22#23 (4 mins read).
What happened in the week of 2022-06-06?
Setting up OpenAPI Contract Tests with a Rails and RSpec codebase (2 mins read).
How to run OpenAPI-driven contract tests against a Rails API.
Week Notes 22#22 (4 mins read).
What happened in the week of 2022-05-30?
Only testing your public API in a Go package (3 mins read).
How to test only exported parts of a package in Go.
API Design tip: use objects for similar data (1 mins read).
Why you should use objects to nest similar data in JSON responses.
Idea for Open Source/Startup: monetising the supply chain (2 mins read).
An idea I've had for how to better distribute support to Open Source libraries in the supply chain for your software.
Week Notes 22#21 (2 mins read).
What happened in the week of 2022-05-23?
Describing JSON Patch operations with OpenAPI (2 mins read).
How to describe your JSON Patch endpoints using OpenAPI.
Weirdness with git diff-index
showing 1 file changed, 0 insertions(+), 0 deletions(-)
(1 mins read).
Something weird I hit last week with git diff-index
, which shows 1 file changed, but no changes.
Week Notes 22#20 (2 mins read).
What happened in the week of 2022-05-16?
Introducing a library for OpenAPI contract testing with Go's net/http
package (2 mins read).
Creating a Go library that can verify net/http
handlers implement an OpenAPI contract, for use with testing.
Testing Go net/http
handlers (1 mins read).
How to write unit tests to validate an HTTP handler.
Week Notes 22#19 (5 mins read).
What happened in the week of 2022-05-09?
Constructing a serialised YAML string in Ruby (1 mins read).
How to convert a YAML document to a string representation, preserving escaped newlines, with Ruby.
Lessons learned from modernising a lesser maintained (Spring Boot) service (16 mins read).
What I learned from taking ownership of a lesser maintained service and bringing it up to a better standard.
Week Notes 22#18 (3 mins read).
What happened in the week of 2022-05-02?
Getting the fingerprint of a certificate in Go (1 mins read).
How to retrieve an X.509 thumbprint from a remote server, in Go.
Getting the OpenID Connect thumbprint for AWS on the command-line with Go (2 mins read).
How to automagically retrieve an OpenID Connect thumbprint for use with AWS' OpenID Connect federated identity.
Setting up a Go package structure for a combined library and CLI tool (2 mins read).
How to structure a Go repository to be both a library and command-line tool(s).
Parsing AWS ALB/ELB access logs into SQLite (2 mins read).
How to take a set of ALB/ELB logs and convert them to an SQLite database for further processing.
When should I use env
to start a command with environment variables? (2 mins read).
When you should use the env
command to specify environment variables when executing a command on the command-line (TL;DR: always).
Should I commit generated Go code? (1 mins read).
Answering whether go:generate
d code should be committed (TL;DR is yes).
Lessons learned from the recent job hunt (13 mins read).
A recap of the recent interview process with several companies, what I learned, and what others should know.
Week Notes 22#17 (5 mins read).
What happened in the week of 2022-04-25?
Installing Nokogiri on an M1 Mac (1 mins read).
How to get Nokogiri building on an M1 Mac, when using Bundler
.
Determining if there are uncommitted changes in Git (1 mins read).
A one-liner to work out whether there are uncommitted changes in a repository.
Building a fault-tolerant work queue for command-line executions with GNU Parallel (2 mins read).
How to use parallel
to create a lightweight work queue of commands, with retry logic and a record of what's been executed.
Extracting Podcast Addict listening history from the SQLite database (2 mins read).
How to get raw listening history from the Podcast Addict database.
Removing 'smart' quotes from a file, on the command-line (2 mins read).
A one-liner with sed
to replace 'smart' quotes with regular quotes.
I'm Joining Deliveroo (2 mins read).
Announcing my move into Deliveroo as a Senior Software Engineer.
Week Notes 22#16 (3 mins read).
What happened in the week of 2022-04-18?
Automagically setting the project version for Go projects in SonarQube (2 mins read).
How to automagically set sonar.projectVersion
for Go projects, based on Git tags.
Week Notes 22#15 (4 mins read).
What happened in the week of 2022-04-11?
Converting a Byte Array to String from a Node.JS Buffer
, in Go (1 mins read).
How to convert an array of bytes to a string using Go.
Prefactoring: Preparatory Refactoring (2 mins read).
Why I use prefactoring as a means to perform up-front refactoring for codebases, splitting these into separate PRs/MRs where possible.
Protecting an Architect Framework Application with OAuth2 or OpenID Connect Authentication (4 mins read).
How to set up OAuth2/OpenID Connect authentication with an Architect Framework application.
Week Notes 22#14 (5 mins read).
What happened in the week of 2022-04-04?
Getting node-canvas to run on AWS Lambda (3 mins read).
Some common issues that occur when using node-canvas on AWS Lambda, and how to solve them.
Parsing the Cookie
and Set-Cookie
headers with Go (2 mins read).
How to parse the value of a Cookie
or Set-Cookie
header to a JSON object.
Generating a Go HTTP Client from OpenAPI schemas (2 mins read).
How to generate a Go HTTP client really quickly and easily, with no manual work, using the oapi-codegen project.
Generating Go structs from OpenAPI schemas (2 mins read).
How to generate Go structs really quickly and easily, with no manual work, using the oapi-codegen project.
Setting up GitLab CI for Go projects (2 mins read).
How to set up a basic set of automated builds for Go projects on GitLab CI, for modern Go projects.
Week Notes 22#13 (9 mins read).
What happened in the week of 2022-03-28?
Introducing tiktok-mf2.tanna.dev
, for converting TikTok video metadata to Microformats2 (1 mins read).
Announcing a hosted service for converting TikTok metadata to a Microformats2 object.
Adding a Non-AWS Hosted Custom Domain to an AWS API Gateway without CloudFront (2 mins read).
How to set up a domain name for AWS API Gateway for a domain that isn't managed through AWS Route 53.
Creating a minimal AWS S3 Bucket Policy for deploying with Hugo via hugo deploy
. (1 mins read).
How to configure an AWS S3 Bucket for hugo deploy
with the minimal access required for a role to write objects to.
Automagically deploying Architect Framework applications to AWS uisng GitLab CI (3 mins read).
How to use GitLab's OpenID Connect support with AWS, to allow deployment using the Architect Framework automagically on GitLab CI.
Week Notes 22#12 (7 mins read).
What happened in the week of 2022-03-21?
Avoiding Spring context issues when parallelising @Nested
Spring integration tests (3 mins read).
Using abstract base classes to reduce risk of Spring context overall issues with Spring (Boot) integration tests.