My dotfile contains export PATH=/Users/boyter/go/bin:$PATH to achieve the above. # boyter Bens-MacBook-Air in ~/go/bin $ tree For example, on my current machine it contains the following. One thing I do recommend is update your machines path to point to the bin directory of the default $GOPATH, export PATH=$PATH:$(go env GOPATH)/bin so that you can install anything you are working on quickly and have it available everywhere. However everything has or is moving to modules, so just consider this something you don’t have to learn. Check my previous post if you are curious. ![]() This is something you can comfortably ignore in 2023. Older guides will mention setting up your $GOPATH. So much so even if a project’s go.mod file says 1.20, if it does not use any 1.20 functionality you can probably still compile it using an earlier release. The backwards compatibility promise is real. Other than the Go 1.18 release (which included generics) I have never had any issue always installing the newest version of Go and compiling away. I would suggest always installing from the Go website itself and following the instructions for your OS of choice. The first thing to do is download and install Go. Linting / Static Analysis / Security Scanning. ![]() What follows should be enough for anyone new to Go to get started and ideally start them being productive. A lot has changed since I wrote that and I had been wanting to write an updated version. ![]() I previously wrote about starting a Go project in 2018.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |