Skip to content

Instantly share code, notes, and snippets.

@browny
Created September 8, 2017 06:28
Show Gist options
  • Save browny/1b865532968ac60b12f1aeade25b98d3 to your computer and use it in GitHub Desktop.
Save browny/1b865532968ac60b12f1aeade25b98d3 to your computer and use it in GitHub Desktop.
func (e *Encryptor) Run(
srcType, dstType, x, y, z, i, j string,
) error {
var src []byte
switch srcType {
case "file":
src = e.readFromFile(x, y, z)
case "database":
src = e.readFromDatabase(i, j)
}
// encrypt
...
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment