Carlos Alexandro Becker

Tagged in

golang

GoReleaser: 1k repositories and beyond

When first announced GoReleaser roughly 1 year ago, on January 2017, I never thought it would be somewhat famous. ...

Charting Repository Stars

I always wanted to know how stargazers of my repos increased over time. ...

Writing cli applications with Golang

Last few months I’ve been using Go to write quite a lot of tools. In this post I intent to show not why I chose Go over others, but how I architect those tools, what libraries I use and what kind of automation I have in place. ...

Fast and easy Go binaries delivery

I have some apps written in Go, which I deliver as binaries for each platform using GitHub releases. Until now, I was doing it with a very simple shell script. ...

Watchub

Watchub is a service that notifies you of people who followed/unfollowed you and starred/unstarred your repositories. ...

Setting up a Go build with Glide on CircleCI

I’ve lost a considerable amount of time trying to bind those things together, so I decided to write this quick post about it, so others could also benefit from it. ...

Parse environment variables to structs in Go

In Go, it’s dead simple to get the value from an environment variable: fmt.Println(os.Getenv("HOME")) But, sometimes you have default values… so you would have to do something like this: home := os.Getenv("HOME") if home == "" { home = "THE DEFAULT HOME" } fmt.Println(home) If you need those values in a lot of places, you would end up creating a function for each one or something like that. I found this to be extremely boring....

Small Go Apps Containers

Or: how to ship your app in a <20Mb container. Well, as you may know, there is a good amount of people now building microservices in Go and deploying them as Docker containers. I do not yet have a lot of experience with Go and Docker, but I’ll try to share what I learned while building and shipping an internal tool, here, at ContaAzul. The Go code example I will assume that you know at least a little bit of Go, and, for the sake of simplicity and brevity, I’ll just use a very basic example from the Go wiki:...

Cross-compiling Go

go build generates a binary for the platform you run it in. So, if I build antibody in a Linux machine - which uses Mach-O, it will not work in OS X - which uses ELF. I wanted to distribute antibody at least for Linux and OS X, so I went out searching for how to do this in a not so complicated way… I found an article from 2012, demonstrating how to compile Go itself for multiple platforms, so you can use the specific go to build the binary for the specific platform, which is a lot of work to do....

I wrote Antigen in Go: Antibody

Learning Go was in my TODO list for a while, and finally I did something about it. This post contains some thoughts about it… Before we start, I should familiarize you with antigen. Antigen is particularly slow. With the plugins I have, it takes an eternity to load. I saw an attempt to re-write Antigen in Haskell, but I always believed that Antigen does too much, so I decided that it would be a nice thing to play with....