v18.8.17 GitHub: codingconcepts Twitter: @go_robreid Profile I started developing software professionally in 2006 and in my time as a developer, I’ve written .NET, Go and Java applications, front-ends, APIs, application frameworks, web and Windows services and messaging solutions. I have designed and developed solutions for the police, the travel, sports betting, telecoms and retail industries and financial institutions. Education Kingston University (2005 - 2009) - First-Class with Honours and awarded "

Let’s Encrypt is rocking the SSL boat and the water’s warm.
If you need that swanky EV banner, you’re happy to pay $€£¥‎ for the privilege and you want to manually renew/replace expired certificates, this post is probably not for you.
tl;dr Running services in containers (Docker in particular) is becoming more and more popular, as is securing stuff for free with Let’s Encrypt. This post shows you how to combine the two.

I like a good index. I especially like the handy MongoDB TTL indexes you can apply to date columns to take care of old data automatically.
My latest personal project manages secrets and is backed by BoltDB, a charming embedded key/value store, written in Go.
Being as simple as it is, BoltDB doesn’t have the concept of item expiry. I spent a while Googling for elegant solutions but ended up (as we all often do), rolling my own.

Go’s tooling continues to delight and this one’s a real hidden gem… I’ve just discovered, with the help of exago.io, the testing/quick package in Go’s standard library. It’s a very simple blackbox testing package, which repeatedly executes a given block of your code with values you wouldn’t think to try yourself.
Within minutes of discovering it, I’m already starting to think differently about how I write exported functions and here’s why.

Introduction Foreword This project is by no means complete! If you’d like to get involved and cause some destruction, I’d love to have some contributors and pull requests!
github.com/codingconcepts/albert
For my latest hackathon project, I decided to roll-my-own chaos monkey.
Why not just use the Netflix Simian Army suite I hear you cry? The answer’s simple, we don’t use Spinnaker for continuous delivery and that’s an essential part of their chaos monkey.

I was one of many developers lured to Go by its promise of obscenely high concurrency. I estimate that in my first 37 minutes of playing with Go, I’d spun up in excess of 78 trillion goroutines.
I’m also one of just as many developers who are now in love with Go because of its interfaces.
Recap In Go, interfaces are implemented implicitly, meaning there’s none of this:
public interface IAnimal { void Move(); } public class Dog : IAnimal { public void Move() { } } Only this:

I’m a big fan of optimising (?:as early as I possibly can|only when absolutely necessary).
There’s a great case for not wasting time optimising things which may never need optimising. Especially when those efforts affect readability. Happily, I’ve enjoyed a bit of both (that’s to say “writing code and then optimising it”, not “wasting time, then making my code hard to read”) in a recent project and I’d like to share the experience.

semver, or “semantic versioning” is a simple but effective way to version an application.
In the past, I’ve relied on my CI process (Jenkins, BuildMaster, ActiveBatch etc.) to keep track of my application’s version. This method became non-deterministic and hard to manage when there were multiple versions of my application in different branches of code.
Enter semver semver aims to simplify the process of versioning your application by placing you in control of your application’s version by way of a .

ud is a little CLI I wrote which talks to the Urban Dictionary API and returns the top result by “thumbs up” responses.
I wrote it as part of the Go training material I’m compiling for my colleagues, as it demonstrates the following:
Writing an HTTP client Project layout Vendoring Installation $ go get -u github.com/codingconcepts/ud Usage As with the website, some of the definitions and examples don’t leave much to the imagination, so user discretion is advised!