// InjectAction open beans at first
InjectAction open beans at first
// InjectAction open beans at first
func InjectAction(f cli.ActionFunc) cli.ActionFunc {
	return ConfigAction(func(c *cli.Context) error {
		gh := inject.Graph{Logger: &injectLogger{}}
		for _, p := range plugins {
			if err := p.Init(&gh); err != nil {
				return err
			}
			if err := gh.Provide(&inject.Object{Value: p}); err != nil {
				return err
			}
		}
		if err := gh.Populate(); err != nil {
			return err
		}
		for _, p := range plugins {
			if err := p.Mount(); err != nil {
				return err
			}
		}
		return f(c)
	})
}
func InjectAction ( f cli . ActionFunc ) cli . ActionFunc { return ConfigAction ( func ( c * cli . Context ) error { gh := inject . Graph { Logger : & injectLogger { } } for _ , p := range plugins { if err := p . Init ( & gh ) ; err != nil { return err } if err := gh . Provide ( & inject . Object { Value : p } ) ; err != nil { return err } } if err := gh . Populate ( ) ; err != nil { return err } for _ , p := range plugins { if err := p . Mount ( ) ; err != nil { return err } } return f ( c ) } ) }
InjectAction open beans at first
InjectAction open beans at first