Last active
March 9, 2024 15:01
-
-
Save brndnsmth/e0bb8eaaa13272694d0846637229c4f0 to your computer and use it in GitHub Desktop.
go commands
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Usual process | |
mkdir project-name | |
cd project-name | |
git mod init github.com/brndnsmth/project-name | |
go get -u gorm.io/gorm // example install | |
go get -u gorm.io/driver/sqlite // example install | |
go mod tidy | |
go run main.go | |
// Set install directory for all go modules | |
// Keeps home directory clean by using hidden file | |
go env -w GOPATH=$HOME/.go | |
// List all versions of a module | |
go list -m -versions gorm.io/gorm |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment