Iota Behavior

So, I bumped into a weird behavior with iota in Go that I wasn’t expecting, thought I’d document it here so that I’d find my own blog post next time I searched on it. (Isn’t that how it always works?) package main import ( "fmt" ) const ( STUFF = "STUFF" a0 = iota a1 a2 ) func main() { fmt.Printf("STUFF=%v, a0=%d, a1=%d, a2=%d",STUFF, a0, a1, a2) } With the above code, what is the value of a1?

Compiling Go Binaries with Alpine Docker

So, previously, I discussed how to setup a Self Compiling Go Docker Container. One of the issues I came across while doing so was getting reflex compiled correctly for the alpine environment. I’m quoting directly from this repo: Because alpine linux and therefor gliderlabs/alpine docker containers use musl instead gnu libc, your golang binaries build using libc will not work on alpine. You can further read up on wikipedia on what musl is.

Self Compiling Go with Docker

Imagine a self contained development environment that could detect that there’s a file change on my file system, kill an existing go binary, rebuild the go binary, and then, launch a new process. Introduction I believe that setting up a docker container that self compiles my Go source upon changes within a local development environment will assist myself and colleagues iterate faster. I am a remote engineer with a mix of other disciplines on my team that are new to the language.