Our great sponsors
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
Following up on this post about Snob, let's dive a bit deeper on how it was done and get a better overview from a development perspective.
Deployment is provided through GoReleaser. I suggest checking out its docs and then taking a look at these files in the project:
urfave/cli - A simple, fast, and fun package for building command line apps in Go;
printer.go - Handles printing (showing) information to the user. This is where fatih/color is being used, so we can print pretty information with colors.
config.go - Handles the configuration part (in our case, the key environment variable) with help from Viper;
.goreleaser.yml - GoReleaser config file. You might notice a brews section that keeps the Homebrew formula updated in nunogois/homebrew-brews - This is what makes installing through brew install nunogois/brews/snob possible;