Tarhche

Latest

Most viewed

  • X
    ###
    ###
    ###
  • X
    ###
    ###
    ###
  • X
    ###
    ###
    ###
Contact usOpen source
Tarhche | A fresh design

Articles

Using danceable/container for Dependency Injection | DI (dependency injection) in Go
Using danceable/container for Dependency Injection | DI (dependency injection) in Go

The two previous parts covered the concepts; this one is hands-on. Install danceable/container, bind and resolve services, control their lifetime with bind.Singleton() and bind.Lazy(), and let the container call your functions — then organize the whole thing with danceable/provider's Register / Boot / Terminate lifecycle.

user avatar

مهدی خانزادی

۲۷ مرداد ۱۴۰۵

Service Container and Service Provider | DI (dependency injection) in Go
Service Container and Service Provider | DI (dependency injection) in Go

The container is the warehouse of your application's services; the provider decides what goes into it and when. This part covers both patterns — how a container resolves a dependency graph on demand, how a provider organizes register, boot, and shutdown, and how danceable/container and danceable/provider split that work.

user avatar

مهدی خانزادی

۲۷ مرداد ۱۴۰۵

Dependency Injection and the Tools for It | DI (dependency injection) in Go
Dependency Injection and the Tools for It | DI (dependency injection) in Go

Large software is built from small, independent parts — and those parts need each other. This article explains what a dependency is, why injecting it from the outside beats constructing it inline, and compares the four main DI tools in Go: Dig, Wire, Fx, and Container.

user avatar

مهدی خانزادی

۲۷ مرداد ۱۴۰۵

1