code: func LoadOrGenerateKeyFile(keyPath string) (data []byte, wasGenerated bool, err error) {
  	loadedData, err := ioutil.ReadFile(keyPath)
  	// Call verifyKeyData to ensure the file wasn't empty/corrupt.
  	if err == nil && verifyKeyData(loadedData) {
  		return loadedData, false, err
  	}
  	if !os.IsNotExist(err) {
  		return nil, false, fmt.Errorf("error loading key from %s: %v", keyPath, err)
  	}
  
  	generatedData, err := MakeEllipticPrivateKeyPEM()
  	if err != nil {
  		return nil, false, fmt.Errorf("error generating key: %v", err)
  	}
  	if err := WriteKey(keyPath, generatedData); err != nil {
  		return nil, false, fmt.Errorf("error writing key to %s: %v", keyPath, err)
  	}
  	return generatedData, true, nil
  }
docs: // LoadOrGenerateKeyFile looks for a key in the file at the given path. If it
  // can't find one, it will generate a new key and store it there.