code: func FlattenConfig(config *Config) error {
  	for key, authInfo := range config.AuthInfos {
  		baseDir, err := MakeAbs(path.Dir(authInfo.LocationOfOrigin), "")
  		if err != nil {
  			return err
  		}
  
  		if err := FlattenContent(&authInfo.ClientCertificate, &authInfo.ClientCertificateData, baseDir); err != nil {
  			return err
  		}
  		if err := FlattenContent(&authInfo.ClientKey, &authInfo.ClientKeyData, baseDir); err != nil {
  			return err
  		}
  
  		config.AuthInfos[key] = authInfo
  	}
  	for key, cluster := range config.Clusters {
  		baseDir, err := MakeAbs(path.Dir(cluster.LocationOfOrigin), "")
  		if err != nil {
  			return err
  		}
  
  		if err := FlattenContent(&cluster.CertificateAuthority, &cluster.CertificateAuthorityData, baseDir); err != nil {
  			return err
  		}
  
  		config.Clusters[key] = cluster
  	}
  
  	return nil
  }
docs: // Flatten changes the config object into a self contained config (useful for making secrets)