func (c *Container) Extract(target interface{}, options ...ExtractOption) (err error) {
	var params = di.ExtractParams{}
	for _, opt := range options {
		opt.apply(&params)
	}
	return c.container.Extract(target, params)
}
Extract populates given target pointer with type instance provided in the container.

var server *http.Server
if err = container.Extract(&server); err != nil {
// extract failed
}

If the target type does not exist in a container or instance type building failed, Extract() returns an error.
Use ExtractOption for modifying the behavior of this function.
package inject
import (
	"github.com/defval/inject/v2/di"
)
func New(options ...Option) *Container {
	var c = &Container{
		container: di.New(),
	}
	for _, opt := range options {
		opt.apply(c)
	}
	c.compile()
	return c
}
type Container struct {
	providers []provide
	container *di.Container
}