Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/aacebo/box

a zero dependency performant dependency injection library
https://github.com/aacebo/box

Last synced: about 2 months ago
JSON representation

a zero dependency performant dependency injection library

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!