Internets of interest: Warner Losh on the first ten years of UNIX

UNIX turns 50 this year which means 7th edition Research UNIX is that 40.

Flutter: Forbes had it right

“Flutter and Fuchsia. In 2019 you will see these two words everywhere, and now is your chance to get ahead of the curve.” - Todd Fabacher, writing for Forbes Forbes saw it coming back in July of 2018. If you didn’t, then here’s your chance to find out why they did. From l...

How to Parse a JSON Request Body in Go

Let's say that you're building a JSON API with Go. And in some of the handlers — probably as part of a POST or PUT request — you want to read a JSON object from the request body and assign it to a struct in your code. After a bit of research, there's a good chance t...

Modules Part 01: Why And What

Series Index Why and What Projects, Dependencies and Gopls Minimal Version Selection Mirrors, Checksums and Athens Gopls Improvements Vendoring Introduction Modules provide an integrated solution for three key problems that have been a pain point for developers since Go’s initi...

Using context.Context with cobra

Even if creating CLI applications is straighforward with Go, there are many libraries to help with that task, specially to handle subcommands and flags. Cobra is likely one of the more popular ones. It’s relatively simple to use and it’s easy to get something working...

Use internal packages to reduce your public API surface

In the beginning, before the go tool, before Go 1.0, the Go distribution stored the standard library in a subdirectory called pkg/ and the commands which built upon it in cmd/. This wasn’t so much a deliberate taxonomy but a by product of the original make based build syste...

1º Open Source Joinville Meetup

Shared some tips about managing medium-sized OpenSource projects. The slides are in Portuguese.

Integration Testing in Go: Part II - Set-up and Writing Tests

Prelude This post is the 2nd installment of a 2 part series about integration testing. You can read the first installment, which is about executing tests in a restricted environment using Docker. The example repository that this post draws it examples from can be found here. Intr...

Be wary of functions which take several parameters of the same type

APIs should be easy to use and hard to misuse. — Josh Bloch A good example of a simple looking, but hard to use correctly, API is one which takes two or more parameters of the same type. Let’s compare two function signatures: What’s the difference between these functions? O...

go.mod's go directive

Recently I ran into a curious behavior related to the go directive in the go.mod file. It’s well documented, but it’s nevertheless surprising. Go 1.11 introduced support for modules, as a way to define a collection of related Go packages. You can find details about it...