diff --git a/README.md b/README.md index 2a5a062..8a5b171 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ pairing with smart people at Hashrocket. For a steady stream of TILs, [sign up for my newsletter](https://crafty-builder-6996.ck.page/e169c61186). -_1688 TILs and counting..._ +_1689 TILs and counting..._ See some of the other learning resources I work on: @@ -130,6 +130,7 @@ If you've learned something here, support my efforts writing daily TILs by - [Clean Up Your Brew Installations](brew/clean-up-your-brew-installations.md) - [Configure Brew Environment Variables](brew/configure-brew-environment-variables.md) - [Export List Of Everything Installed By Brew](brew/export-list-of-everything-installed-by-brew.md) +- [Install Go Packages In Brewfile](brew/install-go-packages-in-brewfile.md) - [List All Services Managed By Brew](brew/list-all-services-managed-by-brew.md) ### Chrome diff --git a/brew/install-go-packages-in-brewfile.md b/brew/install-go-packages-in-brewfile.md new file mode 100644 index 0000000..265ca43 --- /dev/null +++ b/brew/install-go-packages-in-brewfile.md @@ -0,0 +1,27 @@ +# Install Go Packages In Brewfile + +Typically my `Brewfile` is only full of `brew` and `cask` directives. That's +starting to change now that `brew` supports installing Go packages listed in the +`Brewfile`. + +Use the `go` directive and the URL to the hosted Go package. + +Here is an example of a `Brewfile` that includes a `cask`, `brew`, and `go` +directive. + +``` +# screen resolution tool +cask "betterdisplay" + +# Mac keychain management, gpg key +brew "pinentry-mac" + +# Sanitized production Postgres dumps +go "github.com/jackc/pg_partialcopy" +``` + +I've recently added the exact package from above to my [`dotfiles` +repo](https://github.com/jbranchaud/dotfiles/commit/e83e9d19504f0e2f95eba33123f907f999bf865e). + +Here is the [PR to `brew`](https://github.com/Homebrew/brew/pull/20798) where +this functionality was added back in October of 2025.