code: func (config *serviceConfig) LoadMirrors(mirrors []string) error {
  	mMap := map[string]struct{}{}
  	unique := []string{}
  
  	for _, mirror := range mirrors {
  		m, err := ValidateMirror(mirror)
  		if err != nil {
  			return err
  		}
  		if _, exist := mMap[m]; !exist {
  			mMap[m] = struct{}{}
  			unique = append(unique, m)
  		}
  	}
  
  	config.Mirrors = unique
  
  	// Configure public registry since mirrors may have changed.
  	config.IndexConfigs[IndexName] = &registrytypes.IndexInfo{
  		Name:     IndexName,
  		Mirrors:  config.Mirrors,
  		Secure:   true,
  		Official: true,
  	}
  
  	return nil
  }
docs: // LoadMirrors loads mirrors to config, after removing duplicates.
  // Returns an error if mirrors contains an invalid mirror.