neilotoole.io

Tag: go

xcgo

xcgo is a maximalist Docker image for cross-compiling and releasing/distributing CGo-enabled Go/Golang applications. At this time, it can build and distribute macOS, Windows and Linux CGo projects for arch amd64.

xcgo has what gophers crave:

  • go 1.14
  • OSX SDK Catalina / macOS 10.15
  • docker
  • snapcraft
  • goreleaser
  • golangci-lint
  • mage
  • zsh and oh-my-zsh
  • and a bunch of other stuff.

Start at the neilotoole/xcgo repo, and then head over to the wiki. The neilotoole/xcgo images are published to Docker Hub.

There’s also a companion example project (neilotoole/sqlitr) that was created explicitly to exhibit xcgo: it demonstrates pretty much the entire array of xcgo's capabilities, showing how to release to brew, scoop, snap, Docker Hub, GitHub, etc.

lg v0.2

The first version of the lg package, released years ago, was one of those rites of passage for Go devs: everybody needs to do it once. This v0.2 release has a legitimate purpose: it is an exploration of a small, leveled, unstructured logging interface for enterprise applications. lg delegates the actual log entry creation to backing libs (such as uber/zap), explores some idioms (log.WarnIfFuncError), and plays nicely with testing.T.

gohdoc

gohdoc is a command line tool that opens a package’s godoc in the browser. Use like this:

$ gohdoc .               # open current dir godoc in the browser
$ gohdoc fmt             # open pkg fmt
$ gohdoc encoding/jso    # will open pkg encoding/json

This feels like one of those things that should be included in the Go toolchain. See the repo for more.

sq 0.51.0

After yet another hiatus, sq 0.51.0 is available. This release adds basic notification functionality (Slack, HipChat). This is useful for long-running jobs. Download via sq.io.

sq 0.50.3

Back in the saddle after some downtime… sq 0.50.3 is now available. Finally there’s conditional selects (basically, the SQL WHERE clause), and a number of other improvements. Download via sq.io.

sq 0.32.1

sq 0.32.1 is out. There’s a bunch of additional output formats in this release: Excel, CSV, TSV, and XML. Download via sq.io.

sq 0.30.0

sq 0.30.0 is done. The major new feature is the addition of the sq inspect command, which provides metadata about the datasource (schema, tables, cols, etc). Download via sq.io.

sq 0.20.1

sq 0.20.1 is now available. There’s a bunch of bug fixes, but the big new feature is cross-datasource joins (you can join an Excel spreadsheet with a MySQL DB, etc.) Download via sq.io.

sq 0.11.3

sq 0.11.3 is now available. This is a bug-fix release. Download via sq.io.

techo testing lib

I’ve just released techo, an Echo-based alternative to Golang’s http.httptest. The genesis was trying to write automated tests for generated (swagger-codegen) code, and I sometimes found stdlib http.httptest to be tedious and verbose. The value of this library is that writing tests is cleaner and expressive with techo.

Swagger Codegen Core Team

In my role at HPE, I’ve been doing a lot of work with Swagger, in particular using the swagger-codegen tool to generate Go clients from our REST API’s swagger document. When I first started working with codegen, the Go generator was pretty minimal (and in beta), and since then I’ve pushed several PRs to the project. I’ll now be doing that in an official capacity: I’ve been invited to be part of the Swagger Codegen Core Team, specifically to look after the Go client generator.

go-github auth API

I’ve been working a lot with the GitHub API of late, for the Go-based client I’m building for HPE. One of the key elements for us (and for everybody else I assume) is the GitHub auth infrastructure. So far, the go-github lib has served us well, except that, for whatever reason, the entire auth API was not implemented. From my perspective, that would have been the first thing I implemented, but that was the situation.