Skip to content

Instantly share code, notes, and snippets.

@davydany
Created August 31, 2022 18:20
Show Gist options
  • Save davydany/b4cd75c0307dc218b1f045c17b9957cc to your computer and use it in GitHub Desktop.
Save davydany/b4cd75c0307dc218b1f045c17b9957cc to your computer and use it in GitHub Desktop.
Getting Started with a Go Project

Getting Started with a Go Project

Install Go

MacOS X

brew install go

Initialize a New Project

Create a new project with the following command and answer any questions that are prompted:

go mod init

Install Dependencies

Install dependencies by calling the go get command. For example, if you need to install the viper library, run:

go get github.com/spf13/viper
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment