The standard testing library in go lacks setup and teardown features, Testify adds this feature (and many others).
Continue reading “Using Testify suite setup/teardown to run operations before/after groups of tests in Go”Enum type in Go
This ‘Season’ type can be used like any other type in go, but with limited allowed values.
Continue reading “Enum type in Go”Define a 404 fallback image in an Angular component
Try to load an image, but if it doesn’t exist instead load another image.
Continue reading “Define a 404 fallback image in an Angular component”How to create a responsive square image with CSS
Create a responsive square element containing an image using ::after pseudo class.
Continue reading “How to create a responsive square image with CSS”Populate Golang relationship field using MongoDB Aggregate and $lookup
Replace the relationship ID with the data object that it references.
Continue reading “Populate Golang relationship field using MongoDB Aggregate and $lookup”Check if Golang interface is a slice
This function returns true if the given interface is a slice, otherwise it returns false.
Continue reading “Check if Golang interface is a slice”Go module with local package folders
A basic go module called example with additional handlers and data packages, which doesn’t require Git.
Continue reading “Go module with local package folders”NgModel not working on custom component in Angular
[(ngModel)] is not working on custom angular components
Continue reading “NgModel not working on custom component in Angular”Recursively rename ordered jpg files in nested folders with Python
Renames all files in leaf directories inside an arbitrarily nested folder structure, following a 4 digit format, e.g. 000x.jpg
Continue reading “Recursively rename ordered jpg files in nested folders with Python”Flexbox to add a spacer
Use Flexbox to push content.
// The span takes up any remaining space between left and right
<div>left</div>
<span style=“flex: 1 1 auto”></span>
<div>right</div>