Reader small image

You're reading from  Go Programming - From Beginner to Professional - Second Edition

Product typeBook
Published inMar 2024
Reading LevelBeginner
PublisherPackt
ISBN-139781803243054
Edition2nd Edition
Languages
Right arrow
Author (1)
Samantha Coyle
Samantha Coyle
author image
Samantha Coyle

Samantha Coyle, a Software Engineer at Diagrid, specializes in Go for cloud-native developer tooling, abstracting application development challenges. Committed to Open Source, she contributes to projects like Dapr and Testcontainers. She boasts a rich history in retail computer vision solutions and successfully stabilized industrial edge use cases with testing and diverse deployments for biopharma data pipelines. Her expertise extends to being CKAD certified and reviewing Go textbooks. She is passionate about empowering early-career, diverse professionals. Samantha is in a family of gophers, and enjoys GopherCon with her brother and identical twin sister. She's a seasoned speaker, having presented at various conferences, including GopherCon.
Read more about Samantha Coyle

Right arrow

To get the most out of this book

Each great journey begins with a humble step. Our upcoming adventure with Go programming is no exception. Before we can do awesome things using Go, we need to be prepared with a productive environment. For this book to best serve you, you should install Git, Docker, and Go version 1.21 or higher. It is recommended that you have 4GB of RAM, and virtualization enabled in BIOS (usually enabled by default). The book is best suited for macOS or Linux, and will require minor tweaks for using Windows equivalent commands if needed. It is recommended to use a 1.6 GHz or faster desktop processor.

A helping hand on additional setup:

Install the Go Compiler

To turn your Go source code into something you can run, you’ll need the Go compiler. For Windows and macOS, we recommend using the installer. Alternatively, to get more control you can download precompiled binaries. You can find both at https://packt.live/2PRUGjp. The install instructions for both methods on Windows, macOS, and Linux are at https://packt.live/375DQDA. The Go compiler is free to download and use.

Install Git

Go uses the version control tool Git to install extra tools and code. You can find the instructions for Windows, macOS, and Linux at https://packt.live/35ByRug. Git is free to install and use.

Install Visual Studio Code (Editor/IDE)

You need something to write your Go source code. This tool is called an editor or an Integrated Development Environment (IDE). If you already have an editor you like, you can use it with this course if you’d like to.

If you don’t already have an editor, we recommend you use the free editor Visual Studio Code. You can download the installer from https://packt.live/35KD2Ek:

  1. Once it’s installed, open Visual Studio Code.
  2. From the top menu bar, select View.
  3. From the list of options, select Extensions.
  4. A panel should appear on the left side. At the top is a search input box. Type Go.
  5. The first option should be an extension called Go by Microsoft.
  6. Click the Install button on that option.
  7. Wait for a message that says it’s successfully installed.

If you have Git installed, follow these steps:

  1. Press Ctrl/Cmd + Shift + P all at the same time. A text input should appear at the top of the window.
  2. Type go tools.
  3. Select the option labelled something like Go: Install/Update Tools.
  4. You’ll see a list of options and checkboxes.
  5. The very first checkbox next to the search input checks all the checkboxes. Select this checkbox, then select the Go button to the right of it.
  6. A panel from the bottom should appear with some activity in it. Once this stops (and it may take a few minutes), you’re all done.

Once done, select View from the top menu bar, then select Explorer.

Install Docker

Docker allows us to run things such as database servers without having to install them and containerize our applications. Docker is free to install and use.

For macOS users, follow the instructions at https://packt.live/34VJLJD.

For Windows users, follow the instructions at https://packt.live/2EKGDG6.

Linux users, you should be able to use your built-in package manager to install Docker. Instructions for common distributions are at https://packt.live/2Mn8Cjc.

You are safe to uninstall Docker, if you wish, once the book is complete.

Install PostgreSQL

PostgreSQL is used within the chapter covering database interactions. To install the PostgreSQL driver, follow the instructions at https://www.postgresql.org/download/.

If you are using the digital version of this book, we advise you to type the code yourself or access the code from the book’s GitHub repository (a link is available in the next section). Doing so will help you avoid any potential errors related to the copying and pasting of code.

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Go Programming - From Beginner to Professional - Second Edition
Published in: Mar 2024Publisher: PacktISBN-13: 9781803243054

Author (1)

author image
Samantha Coyle

Samantha Coyle, a Software Engineer at Diagrid, specializes in Go for cloud-native developer tooling, abstracting application development challenges. Committed to Open Source, she contributes to projects like Dapr and Testcontainers. She boasts a rich history in retail computer vision solutions and successfully stabilized industrial edge use cases with testing and diverse deployments for biopharma data pipelines. Her expertise extends to being CKAD certified and reviewing Go textbooks. She is passionate about empowering early-career, diverse professionals. Samantha is in a family of gophers, and enjoys GopherCon with her brother and identical twin sister. She's a seasoned speaker, having presented at various conferences, including GopherCon.
Read more about Samantha Coyle