Today marks an important milestone: it's now been exactly 10 years since my earliest open-source contribution written in the Go programming language!
Here it is, in all its glory: https://github.com/mdwhatcott/goconvey/commit/05e90a8c8c0eca1492ac326d331e0af63345bab6
That commit was the initial prototype of what became GoConvey, a double-edged testing toolkit for Go that I was commissioned by Smarty (thanks Jonathan Oliver!) to build with Matt Holt (thanks for the pretty UI!). That project was my very first stab at building a production-grade testing tool--I was so thrilled to be working on it. Back then, there was basically only the standard library "testing" package and testify. So, GoConvey was one of the first BDD-style options and the strange thing is that it got kind of popular!
Go has come a long, long way since 2013. Here are some important milestones I remember with gratitude:
- Go 1.2 introduced test coverage reports (which became an important part of the GoConvey web UI).
- Go 1.3 introduced randomized map iteration (broke lots of tests I'm sure).
- Go 1.4 introduced
go generate
and a simplified for-range iteration (for range x {...}
). - Go 1.5 introduced a go compiler written not in C, but in Go (1.4) as well as a concurrent garbage collector, GOMAXPROCS set not to
1
, but the number of cores by default,internal
package, and vendoring.- I remember being at one of the first GopherCons and hearing Russ Cox's talk on how they ported the compiler from C to Go, cool stuff!
- Go 1.6 introduced the first-class
go doc
command, support for HTTP/2, and better runtime detection of concurrent map misuse. - Go 1.7 introduced sub-tests (very exciting for an author of testing tools), the "context" package, along with integration of Context into many standard library package. (I wasn't excited about the way Context infiltrated its way into every nook and cranny of the stack trace...)
- Go 1.10 introduced several testing goodies (caching, json output, etc.)
- Go 1.11 introduced modules!
- Go 1.13 introduced error wrapping and digit separators! (i.e.
1_000_000
) - Go 1.16 introduced embedding of static files into binaries.
- Go 1.18 finally addressed the elephant in the room from the beginning: generics (type parameters)!
- Go 1.20 expanded the utility of coverage reports in programs and integration tests, not just unit tests.
- Go 1.21 introduced
min
,max
,clear
, structured logging, and generic helper packages for "slices", and "maps".
Along the way, so many other things happened (duh!). For instance, I remember seeing the folks from Jetbrains at one of the early GopherCon events, along with a few plugin developers who had created a Go IDE plugin for Intellij that was still in its infancy (many thanks to Alexander Zolotov and Florin Pățan for the pioneering work). I stuck around for a Q&A session with them and asked whether there were any plans for a full-fledged Go IDE. "No plans" was the official answer at the time, but it really didn't take long before the size of the Go community made building that product a foregone conclusion. Well, Gogland, I mean Goland, turned out to be a huge step up from Sublime Text and GoSublime (which were still great and helped us write a ton of code).
It's been a great 10 years with Go. Many thanks to Robert Griesemer, Rob Pike, Ken Thompson, Russ Cox, Brad Fitzpatrick, Andrew Garrend, Dave Cheney, and many others for making such a great language! I wonder what the next 10 years will bring...