Skip to content

Inversion of Control (IoC) and Dependency Injection (DI) for go.

License

Notifications You must be signed in to change notification settings

hpgood/go-spring

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

go-spring/gosp

Inversion of Control (IoC) and Dependency Injection (DI) for go.

go spring 迷你版,快速依赖注入使用。常用于 DDD(Domain-Driven Design) 工程。

example:

import (
    "github.com/hpgood/go-spring"
    "github.com/hpgood/go-spring/simple/core"
    "github.com/hpgood/go-spring/simple/infrastruction"
)

func main() {
    app := spring.NewSpring()
    app.SetDebug(true)
    app.Add(&core.Core{})
    app.Add(&infrastruction.Config{})
    app.Start()
}

About

Inversion of Control (IoC) and Dependency Injection (DI) for go.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages