INNER CODE UNIT · Go

func

go-chassis/go-chassis · bootstrap/bootstrap.go:25

func (b Func) Init() error {
	return b()
}

// InstallPlugin is a function which installs plugin,
// during initiating of go chassis, plugins will be executed
func InstallPlugin(name string, plugin Plugin) {
	bootstrapPlugins = append(bootstrapPlugins, &PluginItem{
		Name:   name,
		Plugin: plugin,
	})
}

// Bootstrap will boot plugins in orders
func Bootstrap() {
	for _, bp := range bootstrapPlugins {
		openlog.Info("Bootstrap " + bp.Name)
		if err := bp.Plugin.Init(); err != nil {

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…