<commit_before># Go-container

[![GoDoc](https://godoc.org/github.com/ncrypthic/gocontainer?status.svg)](https://godoc.org/github.com/ncrypthic/gocontainer)
[![Go Report Card](https://goreportcard.com/badge/github.com/luisvinicius167/godux)](https://goreportcard.com/report/github.com/luisvinicius167/godux)

Simple dependency injection service container for golang

## Usage

```go
package main

import (
	"fmt"
	"github.com/ncrypthic/gocontainer"
)

type Seed struct {
	Name string
}
type BaseStruct struct {
	Id string `inject:"seed"`
}
type CoolStruct struct {
	Name string
	Base BaseStruct `inject:"base"`
}

func main() {
	container := gocontainer.NewContainer()
	container.RegisterService("cool", &CoolStruct{Name: "a cool struct"})
	container.RegisterService("seed", &Seed{"the seed"})
	container.RegisterService("base", &BaseStruct{"base deps"})
	container.Ready() // Populate dependency tree<commit_msg>Update link to goreport<commit_after># Go-container

[![GoDoc](https://godoc.org/github.com/ncrypthic/gocontainer?status.svg)](https://godoc.org/github.com/ncrypthic/gocontainer)
[![Go Report Card](https://goreportcard.com/badge/github.com/luisvinicius167/godux)](https://goreportcard.com/report/github.com/ncrypthic/gocontainer)

Simple dependency injection service container for golang

## Usage

```go
package main

import (
	"fmt"
	"github.com/ncrypthic/gocontainer"
)

type Seed struct {
	Name string
}
type BaseStruct struct {
	Id string `inject:"seed"`
}
type CoolStruct struct {
	Name string
	Base BaseStruct `inject:"base"`
}

func main() {
	container := gocontainer.NewContainer()
	container.RegisterService("cool", &CoolStruct{Name: "a cool struct"})
	container.RegisterService("seed", &Seed{"the seed"})
	container.RegisterService("base", &BaseStruct{"base deps"})
	container.Ready() // Populate dependency tree
{'fraction_non_alphanumeric': 0.14814814814814814, 'fraction_numerical': 0.004901960784313725, 'mean_word_length': 6.011450381679389, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 8, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7670227', 'n_tokens_mistral': 649, 'n_tokens_neox': 622, 'n_words': 118}