Skip to content

Commit 4fce2a2

Browse files
committed
more doc
1 parent 2d678aa commit 4fce2a2

File tree

3 files changed

+67
-10
lines changed

3 files changed

+67
-10
lines changed

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,39 +20,39 @@ This library implements the Dependency Injection design pattern. It may replace
2020

2121
**Why this name?**
2222

23-
I love the **short name** for such a utility library. This name is the sum of `DI` and `Go` and no Go package currently uses this name.
23+
I love the **short name** for such a utility library. This name is the sum of `DI` and `Go` and no Go package uses this name.
2424

2525
## 🔥 Migration from v1 to v2
2626

2727
[Documentation here](https://do.samber.dev/docs/upgrading/from-v1-x-to-v2)
2828

2929
## 💡 Features
3030

31-
- Service registration:
31+
- **📒 Service registration**
3232
- By type inference
3333
- By name
34-
- Service invocation
34+
- **🪃 Service invocation**
3535
- Eager loading
3636
- Lazy loading
3737
- Transient loading
38-
- Service aliasing
38+
- **🧙‍♂️ Service aliasing**
3939
- Implicit (provide struct, invoke interface)
4040
- Explicit (provide struct, bind interface, invoke interface)
41-
- Service lifecycle:
41+
- **🔁 Service lifecycle**
4242
- Health check
4343
- Graceful unload (shutdown)
4444
- Lifecycle hooks
45-
- Scope (a.k.a module) tree
45+
- **📦 Scope (a.k.a module) tree**
4646
- Visibility control
4747
- Dependency grouping
48-
- Injector
48+
- **📤 Injector**
4949
- Dependency graph resolution and visualization
5050
- Default injector
5151
- Injector cloning
5252
- Service override
53-
- Lightweight, no dependencies
54-
- No code generation
55-
- Typesafe API
53+
- **🌈 Lightweight, no dependencies**
54+
- **🔅 No code generation**
55+
- **😷 Typesafe API**
5656

5757
## 🚀 Install
5858

docs/docs/about.md

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
---
2+
title: ✌️ About
3+
description: Discover "do", the dependency injection toolkit for Go
4+
sidebar_position: 0
5+
---
6+
7+
# ✌️ About
8+
9+
**⚙️ A dependency injection toolkit based on Go 1.18+ Generics.**
10+
11+
This library implements the Dependency Injection design pattern. It may replace the `uber/dig` fantastic package. `samber/do` uses Go 1.18+ generics instead of reflection and therefore offers a typesafe API.
12+
13+
**See also:**
14+
15+
- [samber/lo](https://github.com/samber/lo): A Lodash-style Go library based on Go 1.18+ Generics
16+
- [samber/mo](https://github.com/samber/mo): Monads based on Go 1.18+ Generics (Option, Result, Either...)
17+
18+
**Why this name?**
19+
20+
I love the **short name** for such a utility library. This name is the sum of `DI` and `Go` and no Go package uses this name.
21+
22+
## 💡 Features
23+
24+
`samber/do` is built with high attention to the developer and contributor experience.
25+
26+
- **📒 Service registration**
27+
- By type inference
28+
- By name
29+
- **🪃 Service invocation**
30+
- Eager loading
31+
- Lazy loading
32+
- Transient loading
33+
- **🧙‍♂️ Service aliasing**
34+
- Implicit (provide struct, invoke interface)
35+
- Explicit (provide struct, bind interface, invoke interface)
36+
- **🔁 Service lifecycle**
37+
- Health check
38+
- Graceful unload (shutdown)
39+
- Lifecycle hooks
40+
- **📦 Scope (a.k.a module) tree**
41+
- Visibility control
42+
- Dependency grouping
43+
- **📤 Injector**
44+
- Dependency graph resolution and visualization
45+
- Default injector
46+
- Injector cloning
47+
- Service override
48+
- **🌈 Lightweight, no dependencies**
49+
- **🔅 No code generation**
50+
- **😷 Typesafe API**

docs/src/pages/index.tsx

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,13 @@ function HomepageHeader() {
1616
{siteConfig.title}
1717
</Heading>
1818
<p className="hero__subtitle">{siteConfig.tagline}</p>
19+
<div className={styles.buttons} style={{marginBottom: '10px'}}>
20+
<Link
21+
className="button button--secondary button--lg"
22+
to="/docs/about">
23+
Intro
24+
</Link>
25+
</div>
1926
<div className={styles.buttons}>
2027
<Link
2128
className="button button--secondary button--lg"

0 commit comments

Comments
 (0)