code: func ForeachPlugin(kind Kind, fn func(plugin *Plugin) error) error {
  	plugins := pluginGlobal.plugins()
  	if plugins == nil {
  		return nil
  	}
  	for i := range plugins.plugins[kind] {
  		p := &plugins.plugins[kind][i]
  		if p.State != Ready {
  			continue
  		}
  		err := fn(p)
  		if err != nil {
  			return err
  		}
  	}
  	return nil
  }
docs: // ForeachPlugin loops all ready plugins.