From the course: Learning Go

Install and configure Visual Studio Code - Go Tutorial

From the course: Learning Go

Install and configure Visual Studio Code

- [Narrator] I'm using Visual Studio Code as my editor for this course. If you want to follow along, you can download Visual Studio Code from this webpage. There are versions for Windows, Linux, and macOS. On Mac, there's only one version, but on Windows there's a variety of versions, which you choose depends on whether you want it to be available to just the current user or to all users, that would be user versus system. Whether you want to use the installer versus just unzipping the files. And you also should pay attention to which operating system version you have. If you have 64-bit Windows, choose this version 32-bit or if you have an ARM-based Windows computer you can choose this version. Regardless of which operating system you're on, the installation for Visual Studio Code is really simple. So I'll assume that you've already done that and that you fired up visual studio code for the first time. In order to program with Go, you should install an extension. Click this icon for your extensions list. Then click into the search box and type golang. And after a moment, you should see the extension for Go appear, and you can click install. And it takes just a moment to download and install the extension. To test whether the extension can find your Go installation, go to the menu and choose View, Command Pallet. Or you can use the associated keyboard shortcut. Type golang, and then start typing locate. And you should see this option for locate configure Go Tools. Choose that and then take a look at the output that appears at the bottom of the screen. If you see any indications that you need to upgrade your Go tool, follow the prompts. You should then see a listing of all the different tools that are installed. And then you can go back to the Command Pallet and once again, locate your configured go tools. And you'll see all these environment variables appear. You may also see a listing of components they're being installed. If you don't see it at this point, you may see a prompt to install these components later. No matter what, except those offers and install the components. I'm going to scroll back up to these environment variables and I'm looking for an environment variable called Go Route. And here you should see the location of your Go installation. On Mac, it's always the same, while on Windows, it will be wherever you installed it when you installed Go. So if you've gotten this far, you're ready to start creating your first Go source code file. And I'll show you how to do that in the next video.

Contents