Open sourcing some useful Go utilities

Michael Dale
Ellation Tech
Published in
1 min readSep 29, 2016

Today we’re open-sourcing a couple small utilities we use internally:

`multilog` is a replacement for the built-in Go log package, supports a number of different logging levels, support for simultaneous logging to multiple files, a variety of verbosity levels, and “colorful” logs on stderr. We often found that we were writing a lot of boilerplate around the existing Go logger to output our logs the way we wanted them. This doesn’t solve all of the problems we had, but it’s a big improvement from the default logs for us.

`go-json` is a small, expediently-written utility which takes JSON objects as input, and produces Go types into which they can be unmarshaled. It has some limited ability to do type-inferencing, but it doesn’t support arrays with heterogenous types (e.g., [1, “hello”, {“field”: “value”}] will get turned into an array of type `[]int64`), and has a couple of other small limitations. It’s mostly meant to aid in automatic generation of Go structures from a JSON object that exemplifies a contract between servers and clients.

We hope these utilities are useful to you, and welcome issue reports and PRs for them.

--

--