code: func (p *plugins) clone() *plugins {
  	np := &plugins{
  		plugins:  make(map[Kind][]Plugin, len(p.plugins)),
  		versions: make(map[string]uint16, len(p.versions)),
  	}
  	for key, value := range p.plugins {
  		np.plugins[key] = append([]Plugin(nil), value...)
  	}
  	for key, value := range p.versions {
  		np.versions[key] = value
  	}
  	for key, value := range p.dyingPlugins {
  		np.dyingPlugins[key] = value
  	}
  	return np
  }
docs: // clone deep copies plugins info.