CHEATSHEET: INSTALLATION
👉 NOTE: For the missing steps you should continue clicking the Next buttons :)
1 Install Visual Studio Code Editor
- Install it but don't open it yet.
- Go to: https://code.visualstudio.com
- Select your operating system (OS) and start downloading
- Windows: Run the installer.
- OS X: Uncompress the downloaded file and move it to your
~/Applications
directory.
2 Install Git
- Go to: https://git-scm.com/downloads
- Select your OS and start downloading
- Run the installer
- Select VSCode as the default editor
- Windows:
- Enable all the checkboxes
- Select: "Use Git from the Windows Command Prompt"
- Encodings: Select: "Checkout as is..." option.
- Windows:
3 Install Go
- Go to https://golang.org/dl
- Select your OS and download
- Start the installer
-
Windows:
- Installs Go to
C:\Go
- Your
$GOPATH
will beC:\Go\src
- Installs Go to
-
OS X:
- Installs Go to
~/go
- Your
$GOPATH
will be~/go/src
- Installs Go to
-
4 Configure VS Code
-
Open VS Code; from the extensions tab at the left, search for "go" and install it
-
Close VS Code completely and open it up again
-
Go to View menu; select Command Palette
- Or just press
cmd+shift+p
orctrl+shift+p
- Type:
go install
- Select "Go: Install/Update Tools"
- Check all the checkboxes
- Or just press
-
After it's done, open the Command Palette again
- Type:
shell
- Select: "Install 'code' command in PATH"
- NOTE: You don't have to do this if you're on Windows.
- Type:
-
Additional Step for Windows Users: Git-Bash
-
In this course I'll be using bash commands. Bash is just a command-line interface used in OS X and Linux. It's one of the most popular command-line interfaces. So, if you want to use it too, instead of using the Windows default command-line, you can use git bash that you've installed. With git bash, you can type a command in command-line as you're on OS X or Linux.
-
If you don't want to use git bash, it's ok too. It depends on you. But note that, I'll be using bash commands mostly. Because, it allows more advanced commands as well.
-
So, to use git bash, follow these steps:
-
Just search for git bash from the start bar
-
Or, if there's one, click on the icon on your desktop
-
Also setup VS Code to use git-bash by default:
- Open VS Code
- Go to Command Palette
- Type:
terminal
- Select: "Terminal: Select Default Shell"
- And, Select: "Git Bash"
- Type:
-
NOTE: Normally, you can find your files under
c:\
, however, when you're using git bash, you'll find them under/c/
directory. It's actually the very same directory, it's just a shortcut.
-
-
That's all! Enjoy! 🤩
For more tutorials: https://blog.learngoprogramming.com
Copyright © 2018 Inanc Gumus
Learn Go Programming Course