code: func (rules *ClientConfigLoadingRules) Migrate() error {
  	if rules.MigrationRules == nil {
  		return nil
  	}
  
  	for destination, source := range rules.MigrationRules {
  		if _, err := os.Stat(destination); err == nil {
  			// if the destination already exists, do nothing
  			continue
  		} else if os.IsPermission(err) {
  			// if we can't access the file, skip it
  			continue
  		} else if !os.IsNotExist(err) {
  			// if we had an error other than non-existence, fail
  			return err
  		}
  
  		if sourceInfo, err := os.Stat(source); err != nil {
  			if os.IsNotExist(err) || os.IsPermission(err) {
  				// if the source file doesn't exist or we can't access it, there's no work to do.
  				continue
  			}
  
  			// if we had an error other than non-existence, fail
  			return err
  		} else if sourceInfo.IsDir() {
  			return fmt.Errorf("cannot migrate %v to %v because it is a directory", source, destination)
  		}
  
  		in, err := os.Open(source)
  		if err != nil {
  			return err
  		}
  		defer in.Close()
  		out, err := os.Create(destination)
  		if err != nil {
  			return err
  		}
  		defer out.Close()
  
  		if _, err = io.Copy(out, in); err != nil {
  			return err
  		}
  	}
  
  	return nil
  }
docs: // Migrate uses the MigrationRules map.  If a destination file is not present, then the source file is checked.
  // If the source file is present, then it is copied to the destination file BEFORE any further loading happens.