Skip to content

Latest commit

 

History

History
28 lines (20 loc) · 1.11 KB

File metadata and controls

28 lines (20 loc) · 1.11 KB

Documentation

goxdi is a typed dependency-injection library for Go. You provide services by registering factories, then resolve them later with Get / MustGet.

Start here

Guide What you learn
Overview What goxdi is, provide vs resolve, core vocabulary
Getting started Install, first working program, composition checklist

In-depth guides

Each page focuses on one mechanism, with behavior, examples, and pitfalls.

Guide What you learn
Registering services Add*, factories, duplicates, interfaces as tokens
Lifetimes Singleton, scoped, transient — when instances are shared
Scopes NewScope, nesting, Close, io.Closer disposal
Resolving Get / MustGet, resolve context, dependency graphs
Errors Sentinel errors and how to handle them

Reference

Page What you learn
API reference Public types, functions, and error variables