Course Overview
Go is a new programming language, developed by Google in the XXI. century. After its first 1.0 release in 2012, Go quickly became popular, especially for cloud native environments. It is used by Google in house (e.g., for implementing YouTube), and by several leading IT companies, including Uber, SoundCloud, Dropbox and Twitch. Docker and Kubernetes were also written in Go. We can safely say that by now Go is the de-facto standard programming language of cloud native applications.
In this course we introduce participants to this extremely efficient language with plenty of examples and exercises.
Join us to this exciting learning experience! Let's Go!
Training Objectives
At the end of the training participants:
- Understand what Go is and why it has become the de-facto language of cloud native applications, and work with the Go compiler, tools, IDEs, packages and modules.
- Write Go programs using the language basics: syntax, identifiers, variables and assignment, type declarations, pointers, variable lifetime and visibility, and control structures.
- Use the basic data types of Go, including operators and precedence, numeric and logic types, strings, runes and UTF-8.
- Work with composite data types: arrays, slices, maps and structs.
- Declare and use functions, function literals, closures and variadic functions, and handle exceptional situations with defer, panic and recover.
- Understand how Go approaches object-oriented programming and apply methods, pointer receivers and type composition with structure embedding.
- Declare and use interfaces, including type assertions and type switches, based on examples from the standard library.
- Write concurrent programs with goroutines, channels, select and mutual exclusions, and understand the difference between concurrency and parallelism.
- Handle files, use the JSON package and implement basic TCP/IP networking.
- Understand the basics of cloud native programming in Go, including the twelve-factor app and the context package.
Structure
50% theory, 50% hands-on lab exercises
Prerequisites
No prior Go or cloud native development skills are required. It is essential, however, that the attendees have experience in programming in at least one language, such as C, C++, C#, Java, Javascript, Perl, Python, etc. No object-oriented programming skills are required.
Materials
Participants will be provided with a course material in PDF format, as well as plenty of sample Go files for educational use. The course package also contains several exercises along with their suggested solutions.
Course Modules
Module 1: Introduction to Go
- About Go
- Complier, tools, and IDEs
- Packages and modules
Module 2: Go Language Basics
- The Go syntax
- Identifiers, variables, assignment
- Type declaration
- Pointers, new()
- Variable lifetime and visibility
- Control structures
Module 3: Basic Data Types
- Operators and precedence
- Numeric and logic types
- Strings, runes, and UTF-8
Module 4: Composite Data Types
- Arrays and Slices
- Maps
- Structs
Module 5: Functions and methods
- Function declaration
- Function literals, closures, variadic functions
- Special in Go: defer, panic, and recover
- Go and OOP – an overview
- Methods and receivers
- Methods with pointer receivers
- Type composition with structure embedding
Module 6: Interfaces
- Interface declaration, usage
- Examples from the standard library
- Type assertion, type switch
Module 7: Concurrency in Go
- Understanding concurrency and parallelism
- Goroutines
- CSP: channels, select
- Mutual exclusions
Module 8: File Handling and Networking
- Basic file I/O
- Using the JSON package
- Introduction to TCP/IP networking
Module 9: Introduction to Cloud Native Programming in Go
- What is cloud native programming?
- The twelve-factor app
- The context package