Go – Design Patterns (GO5)

Programming, Rust

If you already know Go and want to explore software design, this course explains how Go relies on interfaces and interface-based polymorphism rather than class inheritance. You will practice idiomatic patterns and learn when to favor composition for cleaner code.

This hands-on workshop focuses on composition, small interfaces and practical refactorings to keep systems tidy. Expect live examples, group reviews, and guidance on project layout, dependency management, testability and runtime resilience. Bring your code.

THIS TRAINING COURSE WILL HELP YOU:

  • Apply design patterns and idiomatic alternatives in Go
  • Use composition and small interfaces for maintainable code
  • Implement creational, structural and behavioral patterns
  • Design clean project layout and manage dependencies
  • Improve testability and runtime resilience of services

WHO SHOULD ATTEND?

  • Go developers
  • Backend and microservices engineers
  • Software architects and technical leads
  • DevOps/SRE engineers responsible for reliability
  • Engineers focused on testing and code quality

COURSE LOCATION AND AVAILABLE DATES



Public courses are usually delivered in Czech, but this course is also available in English. We can arrange private training for your team online, at your premises or in our classrooms, and tailor the content to your needs.

For groups of around 4 or more participants, private training can already be comparable in price to booking individual places on a public course. Send us your requirements and we’ll recommend the best format and provide an exact quote.

Request training in English

Course content:

Hide details
  • Design principles in Go
    1. Composition over inheritance, small interfaces, clear boundaries
    2. Functions as values; the options pattern and Functional Options
  • Object creation (creational)
    1. Factory and constructor functions; Functional Options
    2. Builders (idiomatic Go alternatives); singleton with safe init
  • Structural patterns
    1. Adapter (wrappers around io.Reader/io.Writer), Decorator (middleware, logging)
    2. Proxy (caching, lazy init), Facade (layers over subsystems), Bridge (separate interface/implementation)
  • Behavioral patterns
    1. Strategy (swap implementations via interfaces)
    2. Command (operations as values), Template Method (embedding + hooks)
    3. Observer (channels / event bus), Iterator (idiomatic Next/Err/Close)
  • Architectural principles
    1. Clean project layout in Go: cmd/, internal/, packages and dependencies
    2. DI without frameworks, contracts via interfaces, improving testability
  • Testing, observability and resilience
    1. Table-driven tests, mocks/stubs vs fakes, golden files
    2. Circuit-breaker, rate limiting, timeouts, retries with backoff
Prerequisites:
Familiarity with programming in Go.
Recommended previous course:
Go – parallel programming (GO4)
Schedule:
3 days (9:00-17:00)
Language:
Česky

Training and learning environment