Go – Advanced Techniques (GO2)

Programming, Rust

This course helps experienced Go developers use the language's simplicity and flexibility more effectively. You will study the Go data model, learn internal behaviour of slices and backing arrays, and see how choices affect runtime performance.

Gain practical skills to design robust APIs with interfaces and embedding, improve diagnostics using enhanced and typed errors, boost throughput via allocation tuning and profiling, and adopt reliable build & release workflows for production services.

THIS TRAINING COURSE WILL HELP YOU:

  • Understand Go's data model, slices and backing-array sharing
  • Optimize maps for existence checks, iteration and allocations
  • Design robust APIs with interfaces, embedding and io idioms
  • Improve error handling and structured diagnostics and logs
  • Boost performance and set up build/release and cross-compilation

WHO SHOULD ATTEND?

  • Backend developers writing services in Go
  • DevOps / SRE working with Go tools and services
  • Library and SDK authors in Go
  • Engineers focused on performance and profiling

COURSE LOCATION AND AVAILABLE DATES



This course is not scheduled as a public course.
It is delivered exclusively as customised training. The content, duration, date, and delivery format are tailored to the customer's requirements and can also be provided in English.

Request customised training

Course content:

Hide details
  • Deeper into the data model
    1. Slice internals (realloc, copy, grow), backing-array sharing
    2. Map optimizations (key existence, iteration, allocations)
  • Interfaces, methods and API design
    1. Contract programming with interfaces and small interfaces
    2. io.Reader, io.Writer as idioms; adapting custom types
    3. Embedding and composition of behavior
  • Error models and diagnostics
    1. Enriching errors (fmt.Errorf("%w")), sentinels vs typed errors
    2. Logging (log/slog), structured logs, levels and context
  • File and network I/O
    1. os, bufio, filepath, context deadlines for I/O
    2. Basics of net/http: client, server, middlewares
  • Performance and profiling
    1. Allocation leaks, saving allocations, preallocation
    2. Profiling: pprof, trace, -race (race detector)
    3. Practical guidelines for fast, maintainable code
  • Build & release pipeline
    1. Build tags, CGO_ENABLED, cross-compile, ldflags
    2. Repo layout guidance for libraries versus applications
Prerequisites:
Basic knowledge of the Go language.
Recommended previous course:
Go – Introduction to Programming (GO1)
Recommended follow-up course:
Go – Generic Programming (GO3)
Schedule:
3 days (9:00-17:00)
Language:
Česky

Training and learning environment