https://github.com/aacebo/box
a zero dependency performant dependency injection library
https://github.com/aacebo/box
Last synced: 3 months ago
JSON representation
a zero dependency performant dependency injection library
- Host: GitHub
- URL: https://github.com/aacebo/box
- Owner: aacebo
- License: mit
- Created: 2024-10-16T04:58:05.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-10-22T02:00:13.000Z (7 months ago)
- Last Synced: 2025-01-02T14:42:55.024Z (5 months ago)
- Language: Go
- Size: 265 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
![]()
a zero dependency performant dependency injection library# Install
```bash
go get github.com/aacebo/box
```# Usage
```go
b := box.New()
b.Put(&ServiceA{}, &ServiceB{})fn, err := b.Inject(func (a *ServiceA, b *Service B) {
fmt.Println(a, b)
})if err != nil {
panic(err)
}fn()
```# Benchmarks
- coming soon!