GoLang Fundamentals
Objectives:
The objective of the GoLang Fundamentals course is to provide participants with a comprehensive understanding of the Go programming language ecosystem. By the end of the course, participants will be equipped with the necessary knowledge and skills to begin their journey in Go development, including syntax, data structures, concurrency, testing, documentation, and web development.
Prerequisites:
Participants are expected to have some prior programming experience in another language, such as Java, Python, or similar. Familiarity with basic programming concepts such as variables, loops, conditionals, and functions is recommended.
Course Length: 3 Days
Module 1: Introduction to GoLang
Overview, History, and Philosophy of GoLang
Installation and Setup
Downloading and Installing Go
Setting up the Development Environment
Getting started with Playground and Editors
Primitive Types
Declaration and Initialization
Constants
Casting
Outputting with fmt Package and log Package
Functions
Declaration
Arguments and Returns
Special cases (built-in, main, anonymous, init)
Values and Pointers
Function as arguments
Module 2: GoLang Essentials
Building Command-Line Apps
Main package
Compiling/Running/Packaging
Inputs (Command-line Args, User input)
Control Structures
if
switch
for
break/continue
goto
defer
panic/recover
Scoping
Variable scopes
Visibility
Data Structures
Array
Slice
Map
Range
Sorting
User-Defined Types
Structs
Anonymous
Embedding
Methods
Module 3: Advanced GoLang Concepts
Interfaces
Interface Type
The Empty Interface
Type Assertion
Error Handling
Error Types
Best Practices
Concurrency
Go Scheduler Overview
Goroutines
Channels
Buffered Channels
Channel Synchronization
Channel Direction
select Statement
Timeouts
Non-Blocking Channel Operations
Closing Channels
range on a Channel
Signal handling
sync.WaitGroup
sync.Mutex
The atomic Package
Race Detection
Testing
Basic Testing
Example Tests
Test Coverage
Sub Tests
Best Practices
Documentation
godoc
Package
Code
Examples
Benchmarking
Defining
Best Practices
Writing Web Applications
Data Structures
net/http package
Serving wiki Pages via net/http
Editing Pages
http/template Package
Handling Non-Existent Pages
Error Handling
Template Caching
Validation