About the Go Programming Introduction course
This course is entirely in English.
This Go Programming Introduction course, updated to Edition 2024 (1.25) is a course designed for developers eager to explore the Go programming language, from its fundamental building blocks to advanced patterns for large-scale applications. Whether you're a seasoned programmer looking to add Go to your skillset or a newer developer aiming to build a solid foundation in a modern, high-performance language, this course will guide you through all you need to know to get started with Go.
Go is a programming language that stands out from the crowd by providing means to improve on both program performance as well as developer productivity. It has it's roots in the Google and is the defacto language to go to for creating Cloud Native coding.
Who is this Go Programming course for?
This course is suitable for:
- Software developers who want to learn Go to build efficient, scalable applications.
- Backend engineers seeking an introduction to a language designed for speed, simplicity and powerful concurrency.
- Systems and DevOps engineers who want to leverage Go for tooling, scripting, or infrastructure management.
- Students and new programmers who are ready to expand their programming expertise with a language tailored for today’s development needs.
Course objectives for this Go course
What You Will Learn:
- Master Go Fundamentals
- Begin with core concepts such as datatypes, control structures, and functions, which lay the groundwork for writing efficient, reliable Go code. Emphasis is on writing Idiomatic Go.
- Explore Data Structures and Concurrency
- Gain hands-on experience with Go’s unique data structures, such as slices, maps, and structs, and delve into Go’s powerful concurrency model using goroutines and channels.
- Learn Advanced Project Patterns and Architectures
- As you progress, you’ll discover how to organize large Go projects, follow test-driven development (TDD) practices, implement dependencyinjection, and apply advanced design patterns like hexagonal architecture.
- Interoperate with Other Languages
- Learn to bridge Go with languages like C, expanding Go’s utility in multi-language environments and enhancing your ability to integrate Go with legacy code or external libraries.
- Expand into New Frontiers with WebAssembly (WASM)
- Understand how to compile Go code to WebAssembly, enabling you to run Go applications in web environments and explore exciting new possibilities with Go-WASM interoperability.
By the end of the course, you will be equipped with the skills to confidently write, structure, and optimize Go applications, making you proficient in a language known for its simplicity, efficiency, and versatility in developing modern software solutions.
Recommended prerequisites
Prior experience in other programming languages like Python, Javascript, C, C++ or Java is considered helpful.
The course will provide foundational knowledge and gradually introduce more advanced topics, ensuring accessibility for beginners and depth for more experienced programmers.
Course Outline Introduction to Go Programming
Day 1: Fundamentals of Go Programming
Part 1: Course Overview & Go Basics
- Introduction to the course and objectives.
- Overview of Go language and its philosophy.
- Setting up the Go environment (installation and configuration).
- Choosing and installing development tools.
- Introduction to Go packages.
Part 2: First Steps in Go
- Writing your first Go program.
- Understanding Go’s building blocks.
- Reserved keywords and naming conventions.
- Exploring the Go standard library.
- Variables and constants (declaration, lifetime, and scope).
- Understanding pointers in Go.
Part 3: Basic Data Types and Constants
- Overview of Go’s basic data types.
- Handling numbers, strings, and booleans.
- UTF-8 and Go’s foundation in Unicode.
- Working with strings in Go.
- Introduction to the iota constant generator.
Part 4: Working with Collections
- Understanding complex data types in Go.
- Arrays and slices: creation and manipulation.
- Maps: key-value storage in Go.
Part 5: Structs in Go
- Understanding structs and their usage.
- Literal structs and handling data with structs.
- Struct embedding for composition.
- Working with anonymous fields in structs.
Part 6: Functions in Go
- Declaring and calling functions.
- Using variadic and recursive functions.
- Understanding function objects and anonymous functions.
- Working with deferred functions for cleanup.
Day 2: Packages, Modules, and Error Handling
Part 1: Packages and Code Organization
- Understanding packages in Go.
- Types of packages and their usage.
Part 2: Modules in Go
- Introduction to Go modules and their history.
- Semantic versioning principles.
- Creating and managing your own modules.
Part 3: Testing, benchmarking and profiling in Go
- Testing in Go.
- Benchmarking in Go.
- Profiling in Go.
- Profile Guided Optimization.
Part 4: Error Handling
- Effective error handling in Go.
- Using panic and recover.
- Error handling patterns and best practices.
Day 3: OOP, Generics and GO Standard Library
Part 1: Object-Oriented Programming in Go
- Introduction to Object-Oriented principles in Go.
- Go’s approach to OOP and what it lacks.
- Structs and pointer receivers as alternatives.
- Data hiding and encapsulation.
Part 2: Interfaces and Contracts
- Creating and using interfaces to enforce contracts.
- Interface satisfaction and type assertions.
- Using interface switches for flexible code.
Part 3: Generics in Go
- Concept of Generics.
- Using Generics in the std. library.
Part 4: I/O and Networking
- File operations and file handling in Go.
- JSON serialization and marshalling.
- Building an HTTP server in Go.
- Introduction to building RESTful APIs.
Part 5: Templating in Go
- Working with Go templating for dynamic content.
Part 6: Defensive programming in Go
- What to look out for while programming in Go.
- How to enforce security.
Day 4: Advanced Topics in Go
Part 1: Iterators in Go
- Concept of Iterators.
- Iterators in the Go std. library.
- Writing your own Iterator.
- Testing Iterators.
Part 2: Concurrency in Go
- Introduction to concurrency concepts.
- Using goroutines, waitgroups, and channels.
- Buffered vs. unbuffered channels.
- Working with multiple channels and managing data flow.
- Using mutexes and atomic operations for critical sections.
- Patterns and best practices for concurrency.
Part 3: Test-Driven Development (TDD) in Go
- Introduction to TDD principles and practices.
- Writing tests with Go’s testing package.
- Structuring test suites and testing for edge cases.
- Using table-driven tests in Go.
Part 4: Dependency Injection and Design Patterns
- Introduction to dependency injection concepts.
- Implementing dependency injection in Go.
- Common design patterns for Go, including singleton, factory, and adapter.
- Organizing projects for scalability and maintainability.
Part 5: Organizing a Go Project
- Structuring a large-scale Go project: packages, modules, and folder structure.
- Hexagonal architecture (Ports and Adapters).
- Managing dependencies with Go modules and vendoring.
- Code review and refactoring best practices.
Part 6: Using GO in containers
- Using KO.
- Setting up a KO project.
- GO and CI/CD.
Part 7: Introduction to WebAssembly
- Overview of WebAssembly and its use cases.
- Why use WebAssembly with Go.
- Compiling Go to WebAssembly (WASM).
- Interacting with JavaScript from WebAssembly Go code.
- Setting up and testing a basic Go-WASM application in a web environment.