Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Go Programming - From Beginner to Professional

You're reading from   Go Programming - From Beginner to Professional Learn everything you need to build modern software using Go

Arrow left icon
Product type Paperback
Published in Mar 2024
Publisher Packt
ISBN-13 9781803243054
Length 680 pages
Edition 2nd Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Samantha Coyle Samantha Coyle
Author Profile Icon Samantha Coyle
Samantha Coyle
Arrow right icon
View More author details
Toc

Table of Contents (30) Chapters Close

Preface 1. Part 1: Scripts
2. Chapter 1: Variables and Operators FREE CHAPTER 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

What this book covers

Chapter 1, Variables and Operators, explains how variables hold data for you temporarily. It also shows how you can use operators to make changes or make comparisons to that data.

Chapter 2, Command and Control, teaches you how to make your code dynamic and responsive by creating rules that must be followed based on data in variables. Loops let you repeat logic over as you learn to take command of your control flow with Go.

Chapter 3, Core Types, introduces you to the building blocks of data. You’ll learn what a type is and how the core types are defined.

Chapter 4, Complex Types, explains that complex types build on core types to allow you to model real-world data using data grouping and by composing new types from the core types. You’ll also look at overcoming Go’s type system when needed.

Chapter 5, Functions – Reduce, Reuse, and Recycle, teaches you the basics of constructing a function. Then, we will dive into more advanced features of using functions, such as passing a function as an argument, returning a function, assigning a function to a variable, and many more interesting things you can do with functions. You will learn the fundamentals of code reuse.

Chapter 6, Don’t Panic! Handle Your Errors, teaches you how to work with errors, covering topics such as declaring your own error and handling errors the Go way. You will learn what a panic is and how to recover from one.

Chapter 7, Interfaces, starts by teaching the mechanics of interfaces and then demonstrates that interfaces in Go offer polymorphism, duck typing, the ability to have empty interfaces, and the implicit implementation of an interface.

Chapter 8, Generic Algorithm Superpowers, showcases the type parameter syntax Go offers to create a generic version of your code that is usable on more than one type. You will understand the when, why, and how to utilize generics to reduce code duplication.

Chapter 9, Using Go Modules to Define a Project, demonstrates how to leverage Go modules to structure and manage Go projects, covering essential Go dependency management files.

Chapter 10, Package Keep Projects Manageable, demonstrates how to leverage Go packages within our programs to keep code manageable and group code into useful subsystems of functionality.

Chapter 11, Bug-Busting Debugging Skills, teaches the fundamentals of finding bugs in our application. You will use various techniques of printing out markers in code, using values and types, and performing logging.

Chapter 12, About Time, gets you a head start in the concept of how Go manages time variables, and what features are provided for you to improve your applications, such as measuring execution time and navigating between time zones.

Chapter 13, Programming from the Command Line, teaches you how to create command line utilities with all that Go has to offer. You will practice flag parsing, handling large amounts of data, exit codes, terminal user interfaces, and learn best practices along the way.

Chapter 14, Files and Systems, shows how Go has great support for working with files and the underlying OS. You will be working with the filesystem, learning how to create, read, and modify files on the OS. You will also see how Go can read a CSV file, a common file format used by administrators.

Chapter 15, SQL and Databases, covers the most important aspects of connecting to databases and manipulating tables, which are very common tasks nowadays, and you’ll learn how to work efficiently with databases using Go.

Chapter 16, Web Servers, teaches you how to use the Go standard packages to create an HTTP server, build websites, and create REST APIs You’ll learn how to accept requests from a web form or from another program and respond in a human or machine readable format.

Chapter 17, Using the Go HTTP Client, instructs you how to use the Go standard packages to create an HTTP client and interact with REST APIs. You’ll learn how to send GET requests to a server and process the response, as well as how to POST form data to a server and how to upload a file to a server.

Chapter 18, Concurrent Work, demonstrates how to make use of Go’s concurrency features to enable your software to perform several tasks at the same time, splitting the work across independent Goroutines and reducing the processing time.

Chapter 19, Testing, helps understand the various types of testing that Go enables to include HTTP testing, fuzz testing, benchmark testing, using test suites, and generating test reports and code coverage of your code.

Chapter 20, Using Go Tools, familiarizes you with the tools that come with Go and explains how you can use them to improve your code. You’ll learn how to automatically format your code with gofmt and goimports. You’ll also learn how to do static analysis with go vet and how to detect race conditions using the Go race detector.

Chapter 21, Go in the Cloud, builds your understanding of preparing your Go code for deployment in the cloud. You will work through adding monitoring capabilities using tools such as Prometheus, OpenTelemetry, and how to containerize your Go application to work with orchestrators such as Kubernetes.

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 $19.99/month. Cancel anytime
Banner background image