Go for Developers: Practical Techniques for Effective Coding
4h 38mIntermediate2024-10-24
Authors

Pearson

Cory LaNou

Mark Bates
Course details
Get a thorough introduction to Golang, the Go programming language. This course enables you to quickly understand and use Go syntax, core features, and idioms. Learn how to write robust, reliable, well-performing production code right from the outset.
Learning objectives
Manage packages, modules, and dependencies.
Apply Golang basics, such as variable declaration, types, and control flow.
Work effectively with collection types, iteration, functions, structs, and pointers.
Understand Go slices and use them properly.
Write idiomatic Go, using principles such as embedding and composition.
Expertly use concurrency to improve code performance.
Create proper tests to quickly identify and fix problems.
Write simpler, better code with generics and interfaces.
Take advantage of channels, context, sync primitives, and other advanced features.
Learning objectives
Manage packages, modules, and dependencies.
Apply Golang basics, such as variable declaration, types, and control flow.
Work effectively with collection types, iteration, functions, structs, and pointers.
Understand Go slices and use them properly.
Write idiomatic Go, using principles such as embedding and composition.
Expertly use concurrency to improve code performance.
Create proper tests to quickly identify and fix problems.
Write simpler, better code with generics and interfaces.
Take advantage of channels, context, sync primitives, and other advanced features.
Skills covered
GoProgramming FoundationsGoogleProgramming LanguagesSoftware DevelopmentOne-Off
Concepts
Introduction
- Go fundamentals - Introduction
Packages, Modules, and Dependencies
- Topics
- Understanding Go modules
- Packages
- Files, folders, and organization
- Dependency management
Go Language Basics
- Topics
- Language overview
- Numbers
- Strings and UTF-8
- Variables
- Constants
- Naming identifiers
- Printing and formatting
Arrays, Slices, and Iterations
- Topics
- Arrays and slices
- How slices work
- Iteration
Maps and Control Structures
- Topics
- Maps
- If statements
- Switch statements
Functions
- Topics
- Arguments and return values
- First class functions
- Variadic arguments
- Deferring function calls
- The init function
Structs, Methods, and Pointers
- Topics
- Structs
- Methods
- Pointers
Testing
- Topics
- Testing basics
- Running tests
- Code coverage
- Table-driven testing
- Test helpers
Interfaces
- Topics
- What are interfaces
- The empty interface
- Using interfaces
- Type assertion
Errors
- Topics
- Errors
- Panics
- Custom errors
- Wrapping and unwrapping errors
- Using errors.As() and errors.Is()
Generics
- Topics
- What are generics
- Type constraints
- Defining constraints
- Underlying type constraints
- Generic types
Channels
- Topics
- Concurrency
- Channels
- Iteration and select statements
- Closed channels
- Buffered channels
- System signals
Context
- Topics
- Contexts
- Context values
- Cancellation propagation
- Context errors
Synchronization
- Topics
- Wait groups
- Error groups
- Data races
- Locking with a mutex
- Performing tasks only once
Working with Files
- Topics
- Directories
- File path helpers
- Files
- Using file system interfaces
- Embedding files
Conclusion
- Go fundamentals - Summary