<h2 id="go-get-started">Go Get Started</h2>
<p>To start using Go, you need two things:</p>
<ul>
<li>A text editor, like VS Code, to write Go code</li>
<li>A compiler, like GCC, to translate the Go code into a language that the computer will understand</li>
</ul>
<p>There are many text editors and compilers to choose from. In this tutorial, we will use an IDE (see below).</p>
<h2 id="go-install">Go Install</h2>
<p>You can find the relevant installation files at <a href="https://golang.org/dl/">https://golang.org/dl/</a>.</p>
<p>Follow the instructions related to your operating system. To check if Go was installed successfully, you can run the following command in a terminal window:</p>
<p>go version</p>
<p>Which should show the version of your Go installation.</p>
<h2 id="go-quickstart">Go Quickstart</h2>
<p>Let's create our first Go program.</p>
<ul>
<li>Launch the VS Code editor</li>
<li>Open the extension manager or alternatively, press <code>Ctrl + Shift + x</code></li>
<li>In the search box, type "go" and hit enter</li>
<li>Find the Go extension by the GO team at Google and install the extension</li>
<li>After the installation is complete, open the command palette by pressing <code>Ctrl + Shift + p</code></li>
<li>Run the <code>Go: Install/Update Tools</code> command</li>
<li>Select all the provided tools and click OK</li>
</ul>
<p>VS Code is now configured to use Go.</p>
<p>Open up a terminal window and type:</p>
<p>go mod init example.com/hello</p>
<p>Do not worry if you do not understand why we type the above command. Just think of it as something that you always do, and that you will learn more about in a later chapter.</p>
<p>Create a new file (<code>File > New File</code>). Copy and paste the following code and save the file as <code>helloworld.go</code> (<code>File > Save As</code>):</p>
<h4 id="helloworldgo">helloworld.go</h4>
<pre><code class="hljs language-go"><span class="hljs-keyword">package</span> main
<span class="hljs-keyword">import</span> (<span class="hljs-string">"fmt"</span>)
<span class="hljs-function"><span class="hljs-keyword">func</span> <span class="hljs-title">main</span><span class="hljs-params">()</span></span> {
fmt.Println(<span class="hljs-string">"Hello World!"</span>)
}
</code></pre>