container

package
v1.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 3, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Container

type Container struct {
	// contains filtered or unexported fields
}

Container the IoC container

func NewContainer

func NewContainer() *Container

NewContainer new a IoC container

func (*Container) Populate

func (c *Container) Populate() error

Populate populate dependency fields for all beans. this function must be called after providing all beans

func (*Container) ProvideWithName

func (c *Container) ProvideWithName(name string, bean interface{}) error

ProvideWithName provide the bean with name

func (*Container) Provides

func (c *Container) Provides(beans ...interface{}) error

Provides provide some beans with default name

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL