Skip to content

bt/btioc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IoC Container for Go

Build Status

Go doesn't currently have a well documented or easy to use IoC container. As I needed one for the project I'm working on, I'm trying to make one that closely resembles Laravel's IoC Container, due to my strong PHP background.

Getting Started

// Instantiate an object. obj := "foobar" // Register into the container. btioc.Register("foo_object", obj) // Retrieve the object. res, _ := btioc.Retrieve("foo_object") // Prints "what the foobar?!". fmt.Printf("What the %s?!", res)

For a more detailed example (or how you can use structs with the container), check out the example file.

About

An IoC container for Golang.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages