Using a Monorepo to publish Lean Go Packages with Workspaces

As a developer who works with Go in my day-to-day development, I constantly struggle with third party packages or tools which bring in a lot of dependencies. This is especially true when you’re trying to keep your project dependencies up to date, while dependabot, and other security software, is screaming about vulnerabilities in dependencies of dependencies. This is especially a problem with two common packages I use: Any HTTP adaptor package, which ships with integrations for multiple server packages, such as Gin, Echo, and others....

How do I Structure my Go Project?

Assuming you read my Starting a Go Project post you should have the starting point for a minimal go web service. For your first project it is easier to keep all your code in one folder, in the base of your project, but at some point you will want to restructure things, this is done for a few of reasons: Having everything in one folder results in a lot of inter dependencies in the code....

Starting a Go Project

Given the changes with Go Modules I wanted to document a brief getting started for Go projects, this will focus on building a minimal web service. Before you start you will need to install Go, I recommend using homebrew or for ubuntu users Golang Backports, or as last resort grab it from the Go Downloads page. So this looks like this for OSX. brew install go Or for ubuntu we add the PPA, then install golang 1....

Diving into vgo from the Golang project

I have been looking into the Versioned Go Command which was released recently by Russ Cox. In summary this project is a pretty rethink of how golang retrieves and stores packages used to build applications, and more specifically how versioned modules are introduced while retaining reproducible builds. The highlights, and standout features for me are as follows: Adds intrinsic support for versioning into the go command. Includes a few new sub commands such as vendor and verify Incorporates a lot of new ideas around the storage and management of golang modules, which seems to correlate to something akin to a github project....