code: func (b *Bundler) BundleFromFile(bundleFile, keyFile string, flavor BundleFlavor, password string) (*Bundle, error) {
  	log.Debug("Loading Certificate: ", bundleFile)
  	certsRaw, err := ioutil.ReadFile(bundleFile)
  	if err != nil {
  		return nil, errors.Wrap(errors.CertificateError, errors.ReadFailed, err)
  	}
  
  	var keyPEM []byte
  	// Load private key PEM only if a file is given
  	if keyFile != "" {
  		log.Debug("Loading private key: ", keyFile)
  		keyPEM, err = ioutil.ReadFile(keyFile)
  		if err != nil {
  			log.Debugf("failed to read private key: ", err)
  			return nil, errors.Wrap(errors.PrivateKeyError, errors.ReadFailed, err)
  		}
  		if len(keyPEM) == 0 {
  			log.Debug("key is empty")
  			return nil, errors.Wrap(errors.PrivateKeyError, errors.DecodeFailed, err)
  		}
  	}
  
  	return b.BundleFromPEMorDER(certsRaw, keyPEM, flavor, password)
  }
docs: // BundleFromFile takes a set of files containing the PEM-encoded leaf certificate
  // (optionally along with some intermediate certs), the PEM-encoded private key
  // and returns the bundle built from that key and the certificate(s).