design-patterns-in-go

command module
v0.0.0-...-c79cdc0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 13, 2025 License: MIT Imports: 2 Imported by: 0

README ΒΆ

Design Patterns in Go 🧠

This repository contains examples of classic software design patterns implemented in Go, organized by category.

Each pattern includes:

  • A clear, commented Go implementation
  • A simple real-world analogy
  • When to use it (and when not to)

πŸ“¦ Categories

Creational
  • Singleton – Ensures only one instance is used (e.g., Redis connection)
  • Factory Method – Powers a URL shortener that selects between random and hash-based generation strategies
  • Builder
Structural
Behavioral

πŸ§‘β€πŸ’» Why this project?

I'm learning and practicing design patterns by building them one by one in Go β€” this is both a personal learning log and a portfolio project. Each pattern is paired with a small real-world example to make it easier to understand and apply.

πŸ›  Language

  • Go (Golang)

πŸ“© Contributions

Feel free to fork, star, or open an issue with ideas or suggestions!

Documentation ΒΆ

The Go Gopher

There is no documentation for this package.

Directories ΒΆ

Path Synopsis
creational
factory Module

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL