Adding Context To Go Errors

When I first started writing Go I treated errors without the respect I gave exceptions in other languages like C#. I attribute this behavior to my misinterpretation of the phrase errors are values. I want to share a few habits with regards to writing error messages in Go that I think are useful for developers to use. The following suggestions are by no means the correct to write error messages.
Read more

Using Go Generate

Recently I needed to define some types who’s main purpose were to simplify the use of some exported package functions. The types represented hundreds of domain specific constants, with each type’s constants made available in separate text documents. This was not an impossible task but certainly not one I would enjoy doing. Fortunately, Go 1.4 introduced a new command, generate, that would make it easier to create these types.
Read more

Local Go Playground

The Go playground is an awesome tool for experimentation and education. Like many other Go programmers, it was where I wrote my first Go program. I find myself using it to test the odd code snippet or answer a forum post with some example code every once in a while. One thing I’ve always wanted the playground to support was my local Go packages. How cool would it be if I could test snippets with code I’ve previously written or downloaded.
Read more

Goodbye Wordpress

I’ve talked about it for a long time, but I’ve finally done it. I’ve finally removed my blog’s dependency on WordPress. I know I’m kind of late to the party but I’m really digging Markdown posts and static pages. For the unaware, Hugo is an open source static website generator. You can view the source code for my website on my Github. Cheers