zdi

package
v1.1.22 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2021 License: MIT Imports: 2 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Di

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

Di Di

func (*Di) Bind

func (d *Di) Bind(name string, v interface{})

Bind Registration container

func (*Di) Exist

func (d *Di) Exist(name string) bool

Exist whether the container exists

func (*Di) Make

func (d *Di) Make(name string) interface{}

Make Make the specified container, return nil if it does not exist

func (*Di) Remove

func (d *Di) Remove(name string)

Remove Unbind container

func (*Di) SoftMake

func (d *Di) SoftMake(name string, v interface{}) (err error)

SoftMake Register if the container does not exist

type IfeDi

type IfeDi interface {
	Remove(name string)
	Exist(name string) bool
	Make(name string) interface{}
	Bind(name string, v interface{})
	SoftMake(name string, v interface{}) (err error)
}

IfeDi IfeDi

func New

func New() IfeDi

New create a di instance

Jump to

Keyboard shortcuts

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