Duration: 32 hours
DescriptionThis training is primarily focused towards developers who have programming experience in other languages, and covers the capabilities and features of Go. The implementation of built-in containers and specific features of control constructs are covered in detail through practical examples. The Go programming language has its own implementation of the object-oriented approach, and therefore special attention is given to interface-based domain decomposition.
Go was developed in view of the efficient use of concurrent and parallel computations - that is why the course provides numerous examples of using concurrent algorithms. The presentation of each new theme is followed by practical tasks. Issues of using standard library capabilities are reviewed, as well as using third-party packages.
Go provides an extensive set of tools to support the development and testing processes, which are also covered in this course. It also deals with some practical tasks, including the interaction with relational databases, and provides an example of REST interface implementation.
- How to install and configure Go compiler. Example of writing, compiling, and running a simple Go program.
- Which integrated development environment can be used for writing code in Go, how to install and configure them.
- Basic built-in tools to support the development process. How to compile and run a Go program, how to get access to documentation and add documentation to your code.
Directory structure / Go modules / Packages
- How to organize the project directory structure to make it compliant with generally accepted rules. Methods for code decomposition into separate components for easy maintenance and reuse.
- Using third-party solutions instead of writing your own code. Managing dependencies and distributed storage of packages.
Data types and variables declaration / Zero values / Type conversions
- Representation of primitive values in the language and performance of basic operations within them.
Containers: arrays, slices, maps
- How to store value sequences: arrays, slices, and hash-tables (their internal representation and use cases).
Branching and loops: break, continue, fallthrough, goto
- Describing algorithms with loops and branching, differences of Go syntax constructs from other programming languages.
Functions / Multiple return values / Variadic parameters / Function literals and closures
- Defining functions and passing parameters. Functions with an arbitrary number of arguments. Functional capabilities, anonymous functions and closures.
Types declarations / Constants / Iota / Structures / Embedded structs / Anonymous structs / Nested structs
- Ways of defining user types and constants, describing sequences of values. How to describe domain entities using language structs.
Pointers / Value and references types
- Managing memory and pointers.
- Function call defer.
Error handling / Panic recover
- How to identify and handle runtime errors. Ways of writing reliable and resilient code.
Methods and interfaces / Method expressions
- Interfaces and its implementation. Building object-oriented code based on interfaces. Methods.
Concurrency vs parallelism / Goroutines / Memory model
- How to do multiple things simultaneously. Concurrent execution based on goroutines. Memory model in Go.
Channels / Blocking and unblocking channels / Select statement
- Writing reliable code: data exchange between goroutines based on channels.
Waitgroups, mutexes, atomics
- Synchronizing separate parts of your program.
Reading and writing files
- How to save data between separate program launches.
Standard library: fmt, log, strings, time, sort, http, math, regexp
- The language’s built-in mechanisms for solving routine tasks.
Testing and benchmarking
- How to guarantee the stability of code by conducting unit tests and how to find the most effective solution for a task.
JSON encoding and decoding
- Data exchange with programs written in other languages.
Databases / PostgreSQL / MongoDB
- Storing data in relational databases.
REST application example
- Example of a full-fledged backend application.
- Language extensions for performing unsafe functions.
- Learn to use data types and syntactic constructs of Go
- Understand the language’s object-oriented model and how to use it for designing program components
- Understand some main difficulties in developing concurrent program code and ways to overcome them
- Learn how to use Go built-in tools and develop code in accordance with expectations of the developer community
- Learn to solve real-world tasks at a production application level
- Developers who have experience programming in other languages
- Architects, system designers, testers