Search icon CANCEL
Subscription
0
Cart icon
Cart
Close icon
You have no products in your basket yet
Save more on your purchases!
Savings automatically calculated. No voucher code required
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Go Programming - From Beginner to Professional - Second Edition

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

Product type Book
Published in Mar 2024
Publisher Packt
ISBN-13 9781803243054
Pages 680 pages
Edition 2nd Edition
Languages
Author (1):
Samantha Coyle Samantha Coyle
Profile icon Samantha Coyle
Toc

Table of Contents (30) Chapters close

Preface 1. Part 1: Scripts
2. Chapter 1: Variables and Operators 3. Chapter 2: Command and Control 4. Chapter 3: Core Types 5. Chapter 4: Complex Types 6. Part 2: Components
7. Chapter 5: Functions – Reduce, Reuse, and Recycle 8. Chapter 6: Don’t Panic! Handle Your Errors 9. Chapter 7: Interfaces 10. Chapter 8: Generic Algorithm Superpowers 11. Part 3: Modules
12. Chapter 9: Using Go Modules to Define a Project 13. Chapter 10: Packages Keep Projects Manageable 14. Chapter 11: Bug-Busting Debugging Skills 15. Chapter 12: About Time 16. Part 4: Applications
17. Chapter 13: Programming from the Command Line 18. Chapter 14: File and Systems 19. Chapter 15: SQL and Databases 20. Part 5: Building For The Web
21. Chapter 16: Web Servers 22. Chapter 17: Using the Go HTTP Client 23. Part 6: Professional
24. Chapter 18: Concurrent Work 25. Chapter 19: Testing 26. Chapter 20: Using Go Tools 27. Chapter 21: Go in the Cloud 28. Index 29. Other Books You May Enjoy

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 chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime