A Go service that incorporates multiple HTTP REST servers using just the built in standard library.
Most software engineers are likely to need to build HTTP REST services in their day job, or use them to explore ideas in their personal projects. We are likely to pick off the shelf libraries that take care of most of the boiler plate for us — for example where I work I only need to implement the endpoints and business logic, everything else is prepackaged, tested and maintained by another team. …
A full walkthrough of how I built a pipeline that deploys an app from a monorepo to GKE
Monorepos are great when working with lots of repos that rely on each other in some way or another. They solve a lot of problems that microservices bring along with them, such as
A walkthrough of Embedding in go version 1.14
Embedding¹ is a clever way of extending/composing many types into a single type. It represents the O² part of SOLID³ principles — Open closed principle; open to extension, closed for manipulation. What this means is that we can easily extend a type so that it does the original thing, as well as something else without having to amend the original implementation.
All running sample code can be found here — https://github.com/ankur22/embedding
In the example below, I’ve declared a
logger and a
checker, and each implement a function
validate respectively. I’ve…
The main reason for creating a VM was to be able to perform a GET request against the sinkhole URL that was highlighted in an article by Wired magazine on Marcus Hutchins. I’m pretty sure i could have safely done it via my laptop without the VM, but it also sounded like a fun little afternoon project to work with iptables.
NOTE: I’m not a professional white hacker/pen tester, the following are just notes that I’ve taken while creating a VM to perform outgoing HTTP requests and to disallow all connections coming in. …
You may one day find yourself needing to perform an ETL job from a file to a remote database. Go is a perfect tool to perform this sort of ETL thanks to go’s ability to easily work with threads.
It’s quite a convoluted task to get multiple goroutines to coordinate the read from the same file — the most robust solution might involve using a consensus algorithm which feels like it’s over engineering the solution. …
The key take away is when we work with TDD:
The final step is important and can only be achieved if we only test the behaviour of the public…
The days were normal, no one could tell the difference during the day. The nights were still dark. Scientists and researchers had seen it coming but could only theorise the reason. That’s what my grand parents told me.
Now there’s no night or day, just light everywhere. It’s still warmer during the day though. Radiation will eventually kill everything on this planet, well, maybe not the beetles or super bugs that may mutate into something else.
There’s no where to run. Our space ships can’t travel faster than light, even if they could which direction would they go? A sky full of infinite stars. It’s peaceful though.
Camino del Santiago — What is it, where is it, can i eat it?! Many questions queued up in my mind when my girlfriend (Jen) mentioned that she was planning on doing the Camino with her friend. Unfortunately her friend was unable to go, but the backup (me) was available.
To the non religious person it’s a long walk from a given starting point to Santiago. To the religious person (particularly Catholic Christians) it’s a pilgrimage.
I’m neither Christian or particularly religious. I sometimes go to the temple (my family is Hindu), and a feeling of serenity does comes over…
On an adventure